I put all developer libraries that I do not want to put into a system path into /DevelopLibs. On Windows I put them in C:\DeveloperLibs. That way I can build supporting libraries of different versions software under there, eg. /DeveloperLibs/abc-1, /DeveloperLibs/abc-2 and test that I have a self-contained executable that runs on my development system without relying on anything in $PATH.
It was a habit on macOS since /Developer used to be where xcode lived until they moved it to /Applications.
It also makes it easy to look in the /DeveloperLibs directory and see if I've got all libraries I need on this machine (I have different development machines under different OSes).
Removing ability to create directories under the root seems draconian for no good reason, other than the iOS-ification of my machine. Not Apple's machine - my machine.
I don't understand why people would ask "why would you want to do that?" because everybody used to defend the ability to only resize windows from the bottom right corner under macOS until a few versions ago, when it became obvious that resizing a window from any edge was a good idea and always had been. But people oddly defended it for decades before that.
What if they now remove the ability to change your desktop wallpaper? Would we all say "but why would you want to change your wallpaper?"? We seem to accept the gradual lock-down of our own machines. Apple users (and I am one) seem to be the most defensive of the company's behaviours and it doesn't make sense - we just have to accept it.
If Microsoft removed the ability to create a directory under C:\, what would the result be? Would we be asking "but why would you want to create a directory under C:\?"? I think not. It'd be the apocalypse.