I seem to recall that back in the day there were three major aircraft builders, Boeing, Lockheed, and Northrup. These companies were asked to bid on a contract to provide what the Pentagon wanted, as an example a fighter/bomber which had the capabilities described in the offer too bid.
These companies would then design and build what 5hey believed was the best idea and hand it over to the Pentagon for testing and evaluation.
The gov would test them and eventually after the kinks were ironed out one was selected andthe others went home after pouring millions into r&d only to come up empty.
There were more companies back in the day. Most have been gobbled up by the three you mentioned, or given up on (military) aviation and/or gone in other directions.