Because a potentially interested 4th grader likely won't ever know such a thing exists.
And even if she did, the teacher likely won't let her download and install it from the internet. But if she asks for permission to run a "Install Command Line Tools" app in /Applications/Utilities/ and check the "Install homebrew" option (or "Install MacPorts" - I really don't care either way... perhaps provide options for both), that's far more likely to get a "yes".
I was only able to learn BASIC and the DOS command prompt because I was in a multi grade classroom, and an older boy (5th grader) whose mother paid for him to have programming lessons taught me on the classroom computer.
The teacher had no clue about any of that... she only knew I started spending “too much time” on the computer.
If there's really demand for some kind of base developer toolkit, why not leave it up for a 3rd party to put together some kind of installer to set it all up for you?