Private: Can make it rich. Really rich, And on average probably make more money while working, assuming the same type of work. OTOH, if you don't make it rich your retirement may not be as nice as you'd like.
Public: Will never be rich. You can solve P=NP, factor large numbers in constant time, and create a revolutionary new UI that every loves, and you'll still get paid as a GS-13, but you'll get a level bump next time your promotion comes up. But when you retire, you'll be comfortable.
It's kind of like the same deal judges get. Almost all federal judges would make a boatload more money as attorneys. But they take the lower pay with job security, salary for life, and a different kind of prestige.
Or don't take chances. It's very common for bureaucrats to retire to become lobbyists, working for private industry at comfortable salaries in order to exploit the regulatory system for others.
Also, the private employees when they retire get no health benefits and have to fund their own retirement from a 401k, whereas the federal employees have guaranteed health care for life and a guaranteed pension. The health care and pension alone are worth at least a few million if you live to a decent age.