Consider tax sheltered accounts (TFSA-RRSP in Canada, 401k in the US). Many people do not understand how they work or even what they are ; a lot of stranger tell me they ''purchased RRSP at their bank last month''.
Also consider the case of freelance consultant. If you are your own business, you must understand what is tax deductible, and what is not.
Finally, different countries have different fiscal law regarding property. A lot of people in Canada invest in real estate because they do not have an easy access to financial markets. Here, capital gains of non primary residence is not tax deductible... oops.
You get the point. The is not financial planning without tax planning. From a dev point of view, consider the fiscal laws of a country like COBOL legacy code. Do not assume it will work as intended.
So you could in many ways reframe "avoiding taxes" as "doing what the government tells you to do".
I think you’ve stated this oddly at a minimum. Why would capital gains on anything be deductible anywhere? Did you mean losses? Or that there’s an exemption amount that you miss for non-primary?
Overpaying taxes (what a lot of people unintentionally do that don't have resources to navigate every nook and cranny of the labyrinthian tax code) accomplishes nothing but make the individual more poor than they already were. Minimizing overpayment is the best possible thing an individual can do.
Others, not so much.
I very much try to follow thr spirit of the law though, not the letter, both in laws I ignore and adhere to.
Not to mention, governments like the US fed will just poof new money out of thin air if they can't afford something anyway.
And... when it comes to tax law, you had better follow the letter not the spirit, otherwise you risk an unpleasant visit from your local tax auditor. Your interpretation of the spirit of the law won't get you out of their crosshairs.
Do people actively look for ways to pay more taxes?
When you put money into a 401K you're shielding income from taxation. A 401K is an explicit tradeoff the government has created; individuals saving more today will hopefully translate into less reliance on the safety net in the future.
If you are American and not reporting the right number of allowances on your W-4, you are giving the gov't a free loan.