Best to always expect the unexpected. Some rifles have been known to fire when activating or deactivating the safety.

I will rarely chamber a live round unless I intend to fire it immediately, and will keep the gun pointed downrange (or in a safe direction) when chambering the round.

Could have been a lot worse.