First know the basics of taxation. I am beginning to think that I am discussing with someone for whom taxation is a very abstract concept. Countries where you earn income always have the first right to levy tax on you. The residing countries come next. That's why many residing countries deduce the income that was already taxed at the income generating country. Any country has a right to levy tax on income being generated from their country. If this is wrong, this would have been settled by an international court, long time back. There is nothing wrong with levying income tax at the place of generation.
To the best of my knowledge, this is not how it works in the majority of developed countries .
India has tax agreements with many other nations to avoid double taxation of foreigners ; those agreements usually exempt foreign individuals and companies from local taxation - if they are non-residential .
A specific work visa might be required, sometimes proof of residence and tax registration in a foreign country will do; but in general, only the country of residence will and can claim taxes, according to the terms of the common international tax treaties .