> Employing every legal trick to minimize taxes is moral and encouraged.
That's your opinion. Many people disagree that minimizing taxes through tricks and borderline "optimization" is moral (see: tax avoidance [0]).
Not everybody shares the same moral compass, as it is linked to many factors, including your political beliefs, country, education, etc.
[0] https://en.wikipedia.org/wiki/Tax_avoidance#Public_opinion