I recently found out that every country in the world taxes its own residents, not only over the income gained in their territory, but worldwide as well, whilst I used to believe that taxes are imposed only by the government whose territory the income generates from. Are there treaties that avoid double taxation, in case a person works temporarily in another country? Or is the latter incumbent?
There are treaties that prevent double taxation, between some pairs of countries and not others. It's impossible to answer in general without knowing the two specific countries.
Even without double-taxation treaties, some countries have tax credits that may allow you to avoid double taxation. For example, the US has a Foreign Tax Credit, which can be used on income with a source in a foreign country that is taxed by both the US and the foreign country because the person is a US citizen or resident. It allows you to take a credit for the amount of tax paid to the foreign government on that double-taxed income, up to the amount of tax you would have to pay to the US for it; the net effect is you end up paying whichever of the two taxes is higher. This does not require any tax treaty between the US and that country. (The US also has the Foreign Earned Income Exclusion, which excludes up to ~$105k of foreign earned income from US taxes for people meeting certain conditions; this may be better than the Foreign Tax Credit, and the Foreign Tax Credit can be used for the remainder of the income that cannot be excluded.)
1It is probably worth pointing out (since the OP talks about it in comments) that many countries do not tax people who are temporarily (and for a shot time) in that country. The term you should google is "resident for tax purposes". May 27, 2020 at 16:24
Every country is different. The USA is one of the few countries that think they have a right to taxes even if a US citizen lived abroad their whole life. Germany uses your world wide income to determine your tax rate (what percentage of your German income you have to pay in tax). Other countries have different rules.
All the countries tax their residents over their world wide income, the US taxes also their own citizens regardless of whether they are residents or not. Ofc, if a US citizen lives in the US; taxability over residence and citizenship coincide.– abdulJun 1, 2020 at 18:49
Not all countries do, that's nonsense. Germany most definitely does not tax you over your world wide income. They use it to calculate your tax rate, but don't charge tax for it. Jun 2, 2020 at 12:34
Sorry then. My fault.– abdulJun 2, 2020 at 12:37
@gnasher729 It seems Germany does tax residents over their worldwide income. § 34c EStG defines a tax credit for income taxes paid abroad but that only confirms it. I am sure not all countries do that (after all, some do not even have personal income taxes) but it is in fact pretty common.– RelaxedJun 5, 2020 at 21:03