It basically boils down to one thing: isolation.
Everything you use will be described by Nix, no system libraries or commands. The only think you rely on is the kernel of the host.
Not only is my environment almost exactly the same from development to CI to deployment but I can actually copy the program exactly as it was built between them (assuming compatible kernel and architecture). For example when I push to my master branch CI automatically runs a build, tests the code with the exact versions of the libraries it will be using in production then uploads them to a binary cache (which is essentially the nix equivalent of a package server), Now I can just install the program on my production servers and it will use the exact versions of the libraries that I tested it with with almost no reliance on the underlying system.
It's like docker but simpler and more elegant.
I'm genuinely curious, I don't really use homebrew either since most of the stuff I need is already installed.