As a civilian, I’m not sure why military leaders would be against this.
In the event of an accidental/negligent discharge, they might look bad to the higher-ups. The best ass-covering move is an outright ban.
It’s because most leaders are misanthropic by experience. They spend an inordinate amount of time dealing with problem people so they come to suspect that everyone is a more likely to be a liability than an asset. No matter how unlikely or even cosmic a misfortune might be, a military (socialist) leader is always asked: “what did you do to prevent this?” They need the political cover of someone like Ted Cruz forcing them to let trained and vetted soldiers exercise their God given rights.