You personally may agree or disagree with this, but that's what someone probably means when they say it is immoral to avoid paying taxes, even if it is perfectly legal. Taxes are part of the general social contract of our society, and aggressively finding ways to avoid paying them tends to a tragedy of the commons type situation.
Surely it's also immoral because it's moral to contribute to the society you benefit from, particularly when the laws are constructed to attempt to make you do so, even when there are loopholes?
So if a company follow the law and they gets tax deduction, it means that that's the tax the society agree that the company should be paying, right?
> loopholes are involuntarily, while tax deductions are intended.
So can the company exercise tax deduction without being called using a loophole? Is it ever intended for tax deduction to be okay for a company?
Whether or not not paying taxes is immoral (by abusing obvious loopholes) is different from the law.
Think of it this way: if you can get an effective tax rate of x% by doing this and y% by doing that, and x < y, what's the moral difference between doing what you need to do to pay x% and the government changing the tax rate so you pay x% either way? It's not a question of what's the most moral percentage to pay in tax, it's a question of whether or not you're defying the law, which you aren't in either case. If the government lowered the tax rate to x% and you decided to cut out the middleman and just pay it, no one would howl at you to voluntarily pay more. So why do people howl at you for obeying other laws that allow you to effectively lower your effective tax rate to the same amount?