By default desktops and documents folders are never located under favourites in finder side bar , perhaps they are viewed under iCloud section , you can remove them by just right clicking on it and remove from sidebar .
This feature is only for convenience to view documents from finder side bar for an administrator , the items can be brought back by clicking the box in finder preferences https://support.apple.com/en-in/guide/mac-help/mchlp2803/10.14/mac/10.14
Regarding the contents in desktops and documents they are always saved when iCloud Drive box and desktops and documents box is checked https://support.apple.com/en-in/guide/mac-help/mchle5a61431/10.14/mac/10.14
Or use another method .
Open system preferences > iCloud and uncheck the box of iCloud Drive a pop up window appears , showing to keep a copy of documents , and remove from the Mac .
( a ) if you had clicked on keep a copy , they will be archived in home folder that can be viewed by clicking on finder in the dock , take cursor on top menu bar > Go > Home > your user name > iCloud Drive ( Archive ) .
However , it is wiser to archive the documents / files https://support.apple.com/en-in/HT204055
Suppose by mistake you delete the documents / files and empty the trash immediately they are erased from the server , but still saved in iCloud Drive ( archive ) , or if you have already set up time machine they can be recovered https://support.apple.com/en-in/HT209152