The defense industry has spent the last 40+ years grooming the DoD into thinking it costs $30mil/unit to produce missiles and drones. They should have rejected any of the bids, but being fueled by massively excessive taxes in the USA, they don't have to answer to any sort of efficiency or profitability. These things should cost less than a Toyota Camry.
The purpose of a system is what it does. It costs $30M/unit because our trillion dollar defense budget is mostly just a jobs program (25%) and wealth transfer apparatus (75%). Killing people is just a side effect.
That budget and wealth transfer requires the US Dollar to remain the world's reserve currency. A lot of the killing has to do with ensuring it remains that way.