He earns 10-20% less but they work significantly more than 10-20% more. If they worked (and had worked) the same hours per year, they'd make significantly less money than he does.
That's expected, the state pays it's employees very well for a multitude of reasons, but primarily: to buy their loyalty, to make them less susceptible to bribes, and to encourage stability. It also has no reason not to, there's no competition.
I don't know the Danish situation, but e.g. a teacher in Germany will have a pension that is higher than the salary of 70-80% of the population.