I don't see why they can't have like "Advanced Science" wage table, to compete for the best engineers and scientists rather than hiring either bottom of barrel or end of career people.
I make much more right now with 8 YoE than my boss in the gov't did and he had a PhD with 20 YoE.
Even if Congress corrected for that, they'd still be locked into slow moving pay raises, and they'd probably become a political target at some point, when some anti-spending congressperson begins harping on how there are so many federal employees make a quarter million dollars a year.
Being a military contractor, for better or worse, inoculates you from a lot of politics. So, yes, the government could pay competitively, but I would be leery about accepting such a position.
The way to make money working for the gov't is to get an established company to price gouge them through contracts so you can make a living wage.
The gov't is wasting a huge amount of money paying a 100% premium for engineers because they aren't allowed to pay what the market demands.
A "data entry specialist" and PhD scientist are paid off the same pay scale at different levels, which is great for equality but kind of difficult when you are trying to pay $31k (which is what someone with a BS in CompSci would get, GS-5) for someone who is going for $150k.
If you have experience or a master's, they'll pay you $51k.
It's absurdist. The GS scale caps out at $143k at GS-15 and requires a PhD and probably decades of work.
It's just taxes, we definitely could.
The fact that we don't has a lot more to do with government culture and a post-Reagan idea that the government should be a thin and highly reactive operation than the money not being there.