They study the tax systems and choose to put the money in economic interactions that put the smallest tax. There are different tax rates in the different countries, but in general there is a tendency globally – to put more taxes on the work (salary) income, and less taxes on capital gains (when you have bought something for X and you sell it for Y and gain the difference (Y – X) or rental income or investments (in companies, stocks, holdings or any type of investment houses). Some of the “asset classes” are more accessible to others. For example buying real estate requires a lot of money. One stock of moderately good company – probably not so much (there are rabbit wholes in there also).
In addition they find what they could do with the assets the possess – like choosing to have vehicles with less annual tax rate, having a headquarter of the company – the owner’s house – at least in the beginning. Also many things are bought through the company – that could be counted as corporate expenditures – even if the things are actually used in the homes of the owners. The owner’s car could be an asset of the company and the gas could be calculated as expenditure (when the business of the company has something to do with it. You can’t calculate gas as expenditure when you have only a software company and there is no business trips done needed for the work). This way – the actual profit (income minus expenses) of the companies is less (or even negative) – so less taxes.
They don’t transfer the assets to currency (paying themselves dividends) – more than what they need to live. They don’t sell their gains and wins and receive money because it is then taxable. They keep the money into the illusional counters of the financial, legal, corporate or whatever system – stocks, bonds, holdings, shares or whatever there is – as long as possible. The countries can’t get it from them while they follow the rules and don’t brake the law and the government needs the money from the companies – not the other types of notes. Pensions, government salaries, health care and whatever is paid with money, not some other imaginary tickets.