You essentially get taxed twice on dividends from overseas companies as you don't get the benefit of the company's imputation/franking credits. This is a tax credit that represents the tax paid by the company, not sure what its called in the US, but its called imputation credits in NZ, and franking credits in Aus.
Ie a company makes 100 dollars, pays tax on that of 28 dollars. A dividend is paid out of 72 dollars, with 28 dollars imputation credits attached (taking the total back up to 100), the investor then pays tax on the 100 at their marginal tax rate, i.e. say 30%, but then can deduct the imputation credits, so effectively only pays 2 dollars in tax. This is to prevent company profits being taxed twice (i.e. once by company and then again when the profits are paid out as a dividend).
If you are a non resident investor you do not get the benefit of these credits which represent the tax paid by the company. So you receive the dividend of only 70 dollars with no credits attached, and then get taxed on that. In NZ we have a double tax agreement with the US, so the US will withhold 15% tax from the 70 dollars, and then when the dividend arrives in NZ, it gets taxed again.
Also in your example, it is not just people from those two countries that can invest. NZers can invest in US ETFS despite the fact that the companies are American and the fund is domiciled there, its just the tax implications make it particularly unfavourable.
This is my understanding of how it works anyway. I could be wrong.