Knowing Marines (including someone who has served in that capacity and is a friend of my daughter (SSgt, USMC)):
The first job of the Marine guards in the embassies is to secure, defend, and destroy if necessary, all of the cryptographic equipment, codes, ciphers, programs etc that might fall into the hands of the enemy if the embassy is in danger of being overrun or invaded by your enemy. If they overrun one of our embassies, that makes them the enemy under long-established standards of diplomatic conduct.
They kind of need to be armed to do that (I see the latest reports suggest two Marines were killed).
William F Buckley -hostage in Beirut - used “Political Officer” as his cover.
Stevens has a similar background but not the military experience.
It is interesting that he was a political officer for Damascus, Syria - Jerusalem, Israel, - and Cairo, Egypt.