There's also no mechanism for the OS to offer the user the ability to purge registry entries when a program is uninstalled, so the registry just bloats further and further.
But they have to be well-written installers (many aren't). And anyways, lots of installers are written by companies which want to leave their footprint behind even if you do uninstall.
Finding orphaned registry entries is hard - it's not always clear what application put them there, and how to determine that the application is still installed.
This is no different with most Linux distributions or macOS. When applications are deployed and create configuration files (system-wide or user), they're often not removed when deleting the application.