And how did we end up with those loopholes?
A flat tax is an idea. It has come up from time to time and failed. There are lobbyists on both sides and both are evil in their own ways.
In the end the elected officials pass laws. Companies pay tax under those laws. The laws have loopholes and those same companies use them.
The. Companies. Are. Not. To. Blame. For. Saving. On. Their. Taxes. Legally. Even if it is a bit unethical while being profitable.