It's a sad but true fact that many companies consider their employees slaves who get a wage. Check their company guidelines and policies carefully and see.
Many now include language about "conduct that reflect poorly on the company image" or some such. You are theirs, 24hrs a day, as far as that is concerned, but you only get paid for the hours actually worked.
Its not often publically touted, and seldom is enforced (that we hear about, anyway), but with the language in some company rules allow you to be disciplined or discharged for a huge number of things you might do (including some totally legal things), ON YOUR OWN TIME!!!!!
Its not all just what happens on company property while you are on the clock. The devil is in the details, and what they tell you, and what they write, and by accepting employment, you agree to can be vastly differnt things.
One comany I ran accross had in its official rules that "employees are forbidden to posess weapons, except in the course of their official duties". And that was all it said, other than listing the punishment for breaking the rule. SO, I asked, and of course they said, "why, no, this doesn't mean you can't own a gun at home...." But that isn't what was written, and added to the rule about "detrimental to company image" (which was a 24/7 thing), they could, should they wish, enforce the penalty agains employee gun owners.
After all you voluntarily agreed to abide by their rules. ALL of them.
As to the OP, he broke a company rule. Thats clearcut as far as I can see. How and why he did it, machts nichts. He's lucky he wasn't fired outright. If your company has a rule about no guns, then you better assume it applies to ALL company functions, at ALL company locations (owned or rented), at ALL times (on or off the clock). Anything else if foolish pollyanaism. And as Forest Gump said, "stupid is as stupid does..."