if you earn income through a foreign country you still have to pay taxes.
Indeed ... but (contrary to popular belief, especially in forums, where opinions are very widely offered) not necessarily US taxes: America has tax treaties with very many countries, and in those cases income taxed in the counterpart country is not additionally liable for US taxation.
All the US citizens working throughout Europe (and in many other parts of the world) who are taxed locally on their incomes by foreign governments are certainly not also paying taxes separately to the US government. This is just a widespread myth.
However, US citizens resident in the US and earning not-locally-taxed money via overseas corporations certainly have to declare and pay taxes on that income at home (a very different point which I suspect may be what you intended to mention?).