This won’t has happened if tried to uninstall using
sudo pacman -Rs thunar
One of the reasons I prefer pacman. This syntax would mean that it tries to remove dependent packages but not packages that depend on thunar. Nevertheless, it would have given you an error message, it can’t be removed as required for xfdesktop. This would have be a warning to stop it.
pamac does not have this option AFAIK only to remove dependent packages or at least you need extra options to achieve this (less dangerous) behavior.