Also, critically, the US government (mostly) allows this. Many other countries have laws or regulations that impede the dynamicity of the economy and disincentivize entrepreneurship (or at least incentivize it less).
I think it's largely in the past now. There's a crapton of regulation, licencing etc. in the US now, maybe a little less than in some other developed places, but it's far from "the land of the free".
This might be true globally, but all across the western world you are pretty much free to start a software company
Laws would change if the culture changes. I think it s cultural, first