> instead of just throwing it into a tax. It makes the government money

It is a tax, but with extra steps.

The reason it makes the government money is because they’re collecting the extra interest that citizens would have earned if they were free to invest it on their own.

Alas, actually not: you can actually invest your CPF by yourself, and most people lose money compared to leaving it with the Gahmen.