As I have said on these threads before, (and I make no apology for that,) it's mostly a rubbish comparison. "Private sector" covers everything from someone in the corner shop to Goldman Sachs executives. "Public sector" also covers a range of very different roles.
Some roles have no direct equivalent between public and private. Mine does - I'm in IT and I've done the same role in public and private sectors. I'm much better off in private - but that's if I'm working for established big corporates. I could also work for smaller companies and be worse off.
Teachers will probably be better off working for a top public (independent) school than in the state sector, but not necessarily in some of the smaller, less high-profile independent schools. (Teachers and nurses should be well-paid - they are highly skilled, very important roles, and I wouldn't object to paying more tax if it definitely went to health and education.)
It's also true the whole package counts. Pension, bonuses, perks, holiday allowance, flexibility... some of those things may be more important than others. There's limited flexibility in my current role, but there is some, and it works well for me currently; there would have been other times in my life when it wouldn't have so much. Having said that, roles with higher salaries are often also those which come with more perks, bonuses and flexibility.
But the main thing is, it's generally a rubbish comparison, particularly for the whole sector rather than breaking i'r down.