The market isn't very free. Aside from regulatory burdens (some of which are onerous, some not) there is a significant tax burden to any business. The US actually has one of the highest corporate income taxes in the developed world. In a saner system a lot of these burdens would be significantly lighter and the pace of business creation would be a bit (perhaps a lot) faster. Instead the negatives caused by these burdens are often attempted to be counteracted through various incentives and in the extreme with corporate welfare.
Usually the benefit of having a particular business sited in your state / metro area more than makes up for the cost of incentives. The $51k per job incentive is a one time cost, whereas the jobs (and the new jobs from growth of the facility) will keep bringing in revenue (and taxes) year after year. SpaceX currently operates at over $200k revenue per employee. Additionally, the cost of constructing the new factory and launch site will vastly exceed the cost of the incentives.
Yeah, the highest nominal tax rate ends up being only a slightly-above-average effective tax rate, and probably a bigger deal than the slightly-above-average effective corporate tax rate is the significantly-lower-than-average benefit that US businesses get for what they are paying...
Having to pay for (compared to other developed countries, both expensive and inefficient) health care for employees on top of paying taxes for instance. Or the comparatively poor transportation, telecommunications, etc. infrastructure -- sure, its an annoyance to individuals, but its also a cost to businesses.
Its probably not a coincidence that the US has both a popular ideology which holds that government is fundamentally horrendously inefficient and an actual public sector that does far worse than other developed countries at providing value for the money customers are paying. Whichever happened first, the two obviously feed off of each other.
Usually the benefit of having a particular business sited in your state / metro area more than makes up for the cost of incentives. The $51k per job incentive is a one time cost, whereas the jobs (and the new jobs from growth of the facility) will keep bringing in revenue (and taxes) year after year. SpaceX currently operates at over $200k revenue per employee. Additionally, the cost of constructing the new factory and launch site will vastly exceed the cost of the incentives.