I've been surprised to see some of my brightest colleagues going to work for public institutions.
At the end, I've also chosen to join a public institution as a freelancer. Depending on where you are from, public institutions may pay quite well. You can go there as a freelancer, but even public servants in their 40ies or 50ies have very good salaries. Age is a big factor in salary calculation there.
Coming from a Silicon Valley style unicorn, public institutions are refreshing. Everything is much slower, people are gentle, humble and unassuming. Technology is a tool, there is just enough of it, and everyone takes on the simplest path to solve the problems at hand.
Of course if you live in Poland or Bulgaria where public service can't match IT salaries, this is not an option.