Installing a package manager and a package from it apparently is harder than installing an OS and the installing a package from its package manager.
And lets be honest here. It’s not like homebrew is a set in stone necessity.
I use Nix, theres macports, you can build the package from source. All with less complexity than running what is in the end a whole os in a vm
Macports and nix and fink will build under a new user id and install as root as per any other Unix. Thus the build can be controlled to only use known versions of other libraries.
Homebrew installs as the current user. - Try using it when you do have multiple users on a mac (which is uncommon).
That is only true on Intel—on Apple Silicon it uses /opt/homebrew—so it will only become less true as time goes on.
The only reason it used /usr/local in the first place was that at the time many of the software packages it supported were broken if installed anywhere but /usr/local. In other words, Homebrew didn’t pick that location to annoy you or because they didn’t know better, but for a real practical reason.
That location was always an optional default, you’re free to change it. If you do, everything will be compiled from source rather than using compiled binaries and won’t be offered support. But it does work.
Anything using normal Unix build tools like autotools allow easy change of install directory.