Closing some invisible window can cause e.g. Firefox crash. Send the message to visible windows and others should be cleaned up by the application.
Killing Xorg makes "unclean" termination of applications. Some apps (Firefox) complains about that at next startup.