I agree it is unfair that you have to pay taxes twice, but unfortunately this is the rule in some countries, unless they have the reciprocity agreement.
I have a bank account in UK and, after filling in a certain form for non-residents, I am free of taxes on the investments earnings. It is basically an incentive to have money in UK, as I understand. And the logic behind it is that I take no advantage of any benefits from the tax collected, as I don't live in UK. That's the same logic in VAT return.
Here in Brazil income taxes vary with the amount of earnings. I don't remember the ranges, but I am in the 27% range. I don't know how to call this, I don't pay 27% of my income, it's rather 27% over a certain amount that is tax exempted, so it's like 0.27*(X-Y), X being the gross income and Y being the exempt income. Anyway, as I am in the 27% range, any extra income (such as stock photography earnings) means paying 27% of taxes. This is awful, as in the end our public services normally lack quality, but this is another story.
Regards,
Adelaide