As far as I know the US taxes the income of its citizens even when they live outside the US. So why can't the US just tax the offshore income of the companies?
It depends; if you are paying taxes to the government of the country you reside in (say, Australia), the US has a reciprocal agreement with them, and you are not charged tax two different times on your income.
On a company level, this seems to translate into "we have super low local tax rates, build companies and campuses here to boost our local economy!" (see: Ireland).
If the US blocked a company from it's market, that company would collapse practically overnight.
The US is the most profitable market in the world with the EU running not too far behind.
Think about Alibaba--it's profit is about connecting Chinese sellers to the profitable markets in the US and EU--not about connecting to other Chinese suppliers.
But the US can't just block offshore companies from its market without absolutely destroying its economy.
What do you think would happen if the US suddenly decided that no company can do business in the US without paying taxes to the US for their offshore profits?
You only have to injunct one. After a couple million in losses, they'll pay up. At that point, the threat of injunction would simply get the other ones to pay.
Or, you start seizing domestic property to pay taxes on the foreign assets.
Do NOT assume the government is ever powerless. It is always bigger than you.