Tax treaties are introduced in order to avoid double taxation.
Let’s say that you have a company in Canada but are also doing some business in the USA, so you have an office there. So the USA will want to tax you because you have an office there, but Canada also wants to tax you because of the residence of your company. In this case you’d traditionally be taxed twice- both in the USA and in Canada. This is very unfair and also highly inefficient.
In order to avoid this situation foreign tax credit tax treaties have been introduced.
So, in our example you’d first pay taxes in Canada and then you’d deduct these taxes from whatever the foreign country, in this case the USA wants to tax you.
This is how foreign tax credit works.
In addition to this there are also tax treaties. Basically, tax treaty is an agreement that under certain circumstances regulates taxation when doing business in multiple countries so you are not taxed in all those places where you’re doing business.
There is also something that’s called anti treaty shopping, which basically prevents you from opening multiple companies abroad to take advantage of different treaties in your favor, If that’s the only reason for opening these companies.