If the icon is a file or folder and you want to keep it but just get it off the desktop:
A: Because you only deleted the shortcut. To remove a program completely, you must go to Settings > Apps (Windows) or Applications folder (Mac) and uninstall it from there. how to remove shortcut from desktop
There are three main ways to remove shortcuts in Windows. If the icon is a file or folder