> So, companies acting completely legally by seeking to minimize their tax burden, which serves to further maximize the money available for their owners, get penalized
It's fairly simple. If you don't want to pay the government, the government doesn't want to pay you. Just as you are acting legally in tax avoidance, they are acting legally in not bailing you out.
> Likewise, companies acting completely ethically, by returning much of their profit to their shareholders via dividends instead of hoarding it themselves get penalized.
This did strike me as strange, but there are several interpretations. As an example, if you're doing well enough to be paying dividends, you don't need to be bailed out.
1. You can incorporate in a tax-advantaged state ("tax haven") and not get benefits ("bail outs")
2. You can incorporate in a non-tax-advantaged state (eg. Denkmark) and get benefits ("bail outs")
Your company has chosen option 1 but you are claiming that your company is being penalized because you can't get the benefits of both options.
Without going into the semantics of the word, I will point out that yes, that is the role of the government. They provide incentives for certain behaviors, and lack of incentives (or even disincentives) for others.