Imagine a scenario where you are a tax resident of Country A (because your family lives there and your children attend local kindergarten all 365 days a year), but you commute every workday to fulfill your job obligations with a company located in Country B just across the border. The problem is: Which of them is allowed to claim income tax from your global earnings?
According to the Laws of Country A (e.g., Germany), the German tax system will say: "He is predominantly and deeply rooted as a German taxpayer because his family and home are here, therefore he must contribute a percentage of his absolutely global earned money to the treasury regardless of whether it's from Earth or Mars".
At the same time, foreign Country B (where the person physically crosses the terminal borders every morning to work at the factory's production line) claims with straightforward constitutional logic: "Income from work financed by employer B that physically occurred within these walls on the soil of my building belongs to the exclusive treasury of my nation, not Germany".
If the state of residence recognizes this easy cooperation measure in its international treaty law for that specific foreign country of work, the resident only reports to the Tax Administration (submits a report by the end of February of the current year about the global payer and money with the foreign tax authority's stamp confirming that transfers and deductions were properly executed there). Then the state of residence completely forgives (exempts you cleanly from the burden of difference) the amount on that taxable income! The tax with the foreign entity is concluded as there are no higher domestic charges or tax withdrawals and corrective differences.
This method is mathematically stricter. Under this rule, a resident of domestic tax residency (Croatia) would pay a smaller mandatory tax abroad, only for our home tax administration to then subsequently apply its progressive strict calculation rate (e.g., on 5,000 EUR net earned according to our calculator) and "Recognize or credit that smaller foreign tax amount" as a deduction called a Tax Application in Croatia, essentially "snatching" the remaining small but legal difference up to the amount you would have paid in Croatia if the whole process happened here. The state from abroad does not return money if their foreign regulation takes more than ours! The measure is taken exclusively as recognition and reduction of payment within prescribed boundaries and differences.
There are certain foreign countries in the world with which the government, even after negotiations, has never contractually agreed on spousal payout benefits (An absolute extreme example was the long-standing conflict with the USA before 2022; the DTAA with the USA only recently came into effect at the end of December after a long transition period). If there is no treaty, the money is mercilessly exploited according to the worst-case scenario. First, the foreign party will cut its absolute share from the gross and pay a raw, smaller net to the foreigner without the right to deduction returns. Then, upon receiving such reduced net income in a domestic bank account, the domestic tax authority, upon automatic receipt of information, adds the full scope of income tax obligations on the entire amount from the initial foreign document – "not sparing" you from the cost of work - leaving high-earning individuals in an absurd financial position!