I deeply dislike it as well, but they are a business and it's only normal that they do - I'm pretty sure any for-profit company in the world would want to maximize profits at expense of tax. It's up to lazy politicans collecting their fat paychecks to close the loopholes when they're found, or pay more attention when they're writing legislation and not create them in the first place. Or not be corrupt and ignore the loopholes for other interests.
And this discussion is exactly how these loopholes are being brought to light, so that when I vote next time I can try to do something about it. Let's not see discussions like these as being something disconnected from "oh well that's a legal/political issue". This is how we close loopholes.