If it's supposed to be a secret, it's a pretty open one.
When a new gun is developed, it is routinely made available to civilians before the military contracts to buy anyway. These civilians are, whether they are aware of it or not, testing the weapon (as unpaid volunteers) in a variety of situations and thereby helping the manufacturer to fix an bugs which might affect use in combat.
But the military is not currently satisfied with the AR-15, so the contractors are currently developing a much stronger rifle, with among other features a longer range. It too will be released for purchase by civilians before the military contract ti actually purchase any.
Apparently it is a point of pride with gun owners to possess "the same weapon the military uses," so it is sure to sell widely and profitably. Not that those profits will prevent or discourage the makers from driving up the price in contracts as high as they can.
I really am beginning to think that our best best is to take the gun lobby at their word when they say "Guns don't kill people, people kill people" and concentrate on preventing people who should never be anywhere near a gun from owning them. That includes people with histories of domestic violence, histories of animal abuse, and other violent behavior Statistics demonstrate that would reduce mass shootings by an factor large enough to be convincing, whereupon we can start identifying other groups. Age should also be a factor. I'm not sure what the current state of the research is n this, but studies also show that humans do not reach full brain development until about the age of 25. That also would be a good start.