I would guess that DoD procurement rules have more to do with it than Congress, but perhaps Congress defined DoD procurement rules.
Milspec is expensive and process heavy, see what a B52 replacement trash can costs, for just one example.
If you think Milspec is expensive, you should see the cost of not having a Milspec supply chain while still being risk-averse.
DoD procurement rules are largely the outcome of Congress trying to prevent executive-industry corruption through mandated process.