Standardized pay, like at universities and the military, has a positive correlation to retention. Though the pay is dramatically lower they bleed talent far more slowly than equivalent tech jobs in the private sector.
The only exceptions I have seen to this are military programmers with experience in Python and C lang or experience in cloud architecture. Those guys are leaving the military as early as possible for more than double pay without having to deal with beginner bullshit like tech stacks or frameworks.