Note that, historically, the US Navy had plenty of its own shipyards, and did produce many of its own ships.
https://en.wikipedia.org/wiki/Category:United_States_Navy_sh...
But that's mostly been "optimized away" in more-recent times, in the name of Capitalism and Campaign Donations.