If you are unfamiliar with the American procurement process it is:
1. demand is generated by the military
2. bid out contract
3. selected a bidder (bidders are defense contractors)
4. deliver contracted goods and also maintain inventory parts and tooling for sometimes up to 25 years
5. local economy becomes dependent on this manufacturing income, bidder lobbies their local congressperson directly or indirectly
6. congressperson does these wacky ass requisition appropriations
7. the factory keeps production at the same level and with same employment
8. military gets delivery for goods they never wanted so they go into storage, because what else are you supposed to do with these things? You can't resell them because it contains military secrets, you can't scrap them from both an optics level and the general military logic that having a spare is generally fine.
This happens even moreso when it is navy vessels that are much larger cost investments (submarines and destroyers) as just making one will take years potentially and there are legitimate concerns for stopping the means of production but it really just turns into a jobs/national pride story.