It's how income/profit taxes work, but not how revenue/VAT taxes work. That's just a set percentage over the revenue you get from consumers (not business to business, or if that has been paid, the total taxes paid can be deducted, which can mean you get money back).
The problem with profit taxes is exactly as you say, but VAT is paid in the country where the consumers live (at least in the EU). This means VAT simple adds to the purchase price, which the company doesn't really feel and ends up basically being the consumer's problem, while the costs and profits are manipulated and moved around so that the company has to pay as little tax on them as possible.
If profit taxes were treated the way VAT is, so the company would have to pay them in the country where they made that profit, which means the revenue in that country minus the costs in that country, that would stop companies from moving their profits around, because they'd have to pay them in the country where they sold their products. And it would make it attractive to make their costs in that country too, rather than outsourcing them to tax havens and low-wage countries.
The problem with profit taxes is exactly as you say, but VAT is paid in the country where the consumers live (at least in the EU). This means VAT simple adds to the purchase price, which the company doesn't really feel and ends up basically being the consumer's problem, while the costs and profits are manipulated and moved around so that the company has to pay as little tax on them as possible.
If profit taxes were treated the way VAT is, so the company would have to pay them in the country where they made that profit, which means the revenue in that country minus the costs in that country, that would stop companies from moving their profits around, because they'd have to pay them in the country where they sold their products. And it would make it attractive to make their costs in that country too, rather than outsourcing them to tax havens and low-wage countries.