By the way, after a new French against tax fraud law was created, https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000037518803/, Google was asked about 1 billion euros as a fine from the French state. It was later canceled. So as far as I know, Google doesn't break any obvious French law about tax fraud, but is pretty good at tax evasion.
I have no clues about other countries.
Is tax evasion moral and the good thing to do? Personally, I think it's evil.
This is not true. Tax Evasion is an illegal activity.
https://www.investopedia.com/terms/t/taxevasion.asp
I believe the term you want is "Tax Avoidance". The terms, although similar, have very different meanings. However, if a company is merely engaging in Tax Avoidance, the state can't force them to pay taxes.
I definitely understand the point you're making, but terminology is important in regards to legality. For better or worse, if Google is in compliance with the law, then the onus is on the legislature to fix whatever loophole they may be using to conduct tax avoidance.
Some places have light touch regulation where courts are used as a measure of last resort, and only for the most flagrant offenders, and so you don't get those case law precedents.
Tax avoidance covers a wide range of activity. At one end you have the perfectly normal and accepted tax planning. But at the other you have companies doing weird things with tax law, and we don't know if that's illegal or not until it goes through the courts. Some of the companies we're talking about have huge amounts of money available to fight court cases which is another reason why countries are reluctant to take cases through the courts.