There's no problem in dragging the folders to the sidebar of Finder under favorites and then deleting them from the desktop. You may mistakenly drag the folder from your desktop to the Desktop folder in Finder.
The desktop on your Mac shows all the files and folders in the Desktop folder in Finder. If you move the desktop folders to the Desktop folder in Finder and then get rid of them on the desktop, you are deleting them from your Mac.
To remove icons from the desktop on your Mac, you can move the desktop items to other folders except the Desktop folder.
The best way to make your desktop show no folders is to hide them on the desktop. Then, when you need to quickly access these folders, you can unhide them.
To hide all items on your desktop, you can use iBoysoft MagicMenu. This right-click enhancer allows you to right-click to hide items.
- Download, install, and open iBoysoft MagicMenu on your Mac.
- Click Extension and then click the download button next to Hide. That is to add the Hide function to your context menu.
- Select all folders on your desktop and then right-click on them, choose Hide File > Hide.