Unpopular opinion: The Windows Registry, a centralized, strongly typed key:value database for application settings, is actually superior to hundreds of individual dotfiles, each one written in its own janky customized DSL, with its own idea of where it should live in the file system, etc.
The language itself has no type enforcement, the type checking is implemented within nixpkgs. This might seem like pedantry, but it really matters for things like LSPs (text editor autocomplete). I think that's what scares some people off: it's like OG Minecraft, you need to have the wiki/search.nixos.org open while you are doing your editing.
That being said, the type checking goes much deeper than what the windows registry does - e.g. it won't allow you to enable conflicting services - like grub and systemd-boot - at the same time.
So can a dotfile, or any other kind of storage. There's really nothing inherently bad about the registry. Its reputation as a place to hide things in is equal parts selection bias, users' lack of technical understanding, and the marketing of "registry cleaner" apps.
I won't argue about leftovers when uninstallig, some package managers do that as well, plus it's not really the registry's fault, that's just bad or badly configured installers/uninstallers.