Must be certified in (X) where certification courses are only available to government employees of a single government office.
Must hold clearances is by far the most common though and the only reason/way to get clearance is to already be working for the government.
I'd say by far the number one thing that keeps the cycle of nepotism going in government though is access to information.
Sure, an agency might be required to publicly post an RFP, but there are like 50 undisclosed qualifications considered and timing and whether you have a personal relationship with a particular individual within the agency plays a huge role. Often the only way around this is to bid so ridiculously low on your proposal that the agency head would be called out for not going with your proposal. This leads to a race to the bottom where people are climbing over each other to provide the lowest quality service to the government often overpromising and under delivering just to get a foot in the door.
My impression is that government tech = All the problems of Enterprise + Academia, all the recognition and support of a non profit, the culture of Uber, and the ethics of Facebook.
It’s just a maelstrom of most developers idea of hell.
And if you were born in hell and they hand you a pitchfork, hey, why not have a go?
But don’t go down there thinking you’re gonna install air conditioning and escalators.