It's because they've been doing firearms research for forty years under the guise of an M16/M4 replacement program. The only difference now is that Milley is the first guy in 40 years to be tired of the wasteful spending. Hell, the guy advocated just giving every soldier a Glock 19 because it's cheaper than testing out a new modular pistol.
"We're not figuring out the next lunar landing. This is a pistol. Two years to test? At $17 million? You give me $17 million on a credit card, and I'll call Cabela's tonight, and I'll outfit every soldier, sailor, airman and Marine with a pistol for $17 million. And I'll get a discount on a bulk buy."
It's an expensive program to be certain, but $150 million for the first year of production is less than 0.02% of the US military annual budget, and only gets cheaper once the rifles are in service and ammo is in large-scale production.
Most of all, I think a lot of the opposition to it is simply because the M16/M4 has been around forever. I'm old enough to where my dad would tell me about how he hated "that goddamn plastic Mattel piece of shit," but now after decades of improvements nobody in the general public even remembers that we ever used anything else.