This may all very well be true.
However.
I’ve yet to see any analysis of the forces in the attack, their armament, and therefore what level of firepower would have been necessary to repel them.
IOW, would 10 Marines have been able to repel the attack or just add to the number of dead Americans? An attack by 100 jihadis with heavy weapons would have been difficult to repel by 5 or 10 Marines armed with personal weapons.
Also, if Marines had used deadly force to successfully defend the consulate, you just know the headlines would have been, “US Marines kill and wound dozens of peaceful demonstrators.”
Not trying to say it was right to not have Marines on guard. But their presence would not of itself have constituted a magic wand that would have resulted in a better outcome. Embassy or consulate guards are not intended to be able to stand a major siege.
I’ve heard there were about 125 gunmen sent in. Do you think 125 cowardly Islamists would have attacked if they knew there were 10 armed Marines on duty? I don’t.
A reasonable question, and possibly the thinking behind the decision.
That could be debated all day long.
BUT
It's 100% certain that having NO bullets is insufficient to repel such an attack.
You are missing the obvious. The security Marines are specifically trained for this mission and vastly outclass “spray and pray” jihadis. Secondly, a defensive force has the advantage of position while an attacking force is exposed. Would 100 al qaeda fighters have beaten 10 Marines? Unlikely but even if they had, they would have lost most of their force in the process. It only took one Marine with a .38 pistol to stop the VC attack on the embassy in Saigon in ‘68.
30 consulate staff did get out and the attackers were repelled by U.S. and Libyan security forces.