The idea of a nation taxing a foreign company not operating within their borders for transactions with (or involving) their citizens is preposterous
Canada's money belongs to Canada. If a Canadian citizen wants to spend that money, the Canadian government is within its rights to demand that a tax be paid when that money is spent.
In order to do business in Canada, you have to agree to Canada's legal terms. One of those terms is that if you are collecting Canadian money, a tax needs to be paid on that expenditure. Now, it could be required that each citizen pay that tax for each transaction; which is difficult to enforce, so, the legal agreement is that the business collects those taxes and passes them on the Canadian government. The money NEVER belonged to the business to begin with. Asking for what is owed is NOT an overreach. Whining about owing a few billion dollars falls on deaf ears when you should have never thought that money was yours to begin with.
(that being said, the tax WAS indeed enacted as a form of "revenge", so, whatever.)