> 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.