Using legal ways to minimize one's taxes is of course encouraged. It's still a way of paying the tax man, you follow the laws and do not pay more than what you owe. Which is hopefully 0. Nothing wrong with that. I never said to "give charity" to the government.
If the exchange is not consensual, it’s theft. No one feels good about it because it is coercion with the threat of violence. Just like rape, it goes against God’s order. Hiding your valuables from thieves is to be encouraged. Offering no resistance to rapists invites more of that behavior. The 10 commandments are all just one: do not steal.