Isn't it the same for Windows? There have been countless programs throughout the years that I've uninstalled and saw remnant folders in %appdata%, Documents folder, Program Files folder with only 2 remaining files inside, sometimes even hidden folders by default.
> Isn't it the same for Windows?
Sometimes. Many apps do clean up after themselves.
It depends on the program. Many of them clean up, usually with a little checkbox to confirm throwing away your settings, but a lot don't. It might not be 100% of the apps, or even 50% for that matter, but it happens.
On macOS that mechanism is simply impossible if you install the app using the drag&drop method.