Actually, since the new "9/11 Rules" were put in place, you really *don`t* have many rights as a customer, including the fact that you can no longer lock any luggage....
This is false. First, enhanced airport security actually dates back to the Lockerbie bombing, not 9/11.
And second, you can witness the inspection of your checked baggage and lock it any way you want to. I always do both of these things. Just ask. Because the inspection of bags varies from airport-to-airport, the procedure will also vary. But it always begins with you asking. Sometimes, the ticket desk agent will reply that it is not possible or permissible; this is because doing so will require extra time and effort on the clerk's part and they just want to get you on your way and them onto the next-in-line. So, insist. Just tell the clerk that you have the right to and want to witness the inspection and then lock your bag. Ask for a supervisor. I have always prevailed in this in every major airport in the country.
Last week, I flew out of PDX which handles the problem quite easily. But, they were on some sort of alert and were doing the the full explosive-detection-swab drill on every bottle of wine in every checked bag. This is Portland, Oregon, the top of the world-famous Willamette Valley wine country. Everyone has wine in their baggage whether taking home from their time in Portland or taking to their host for their time away. I had five bottles. The bag ahead of mine had six bottles which, even from a distance, I recognized as $120/bottle wine. The TSA agent butterfingered one bottle and it fell to the floor. Fortunately, it was a short fall to carpet and the bottle didn't break, but it was a very tense moment. I noticed that he was rather careful with my bottles which I was thankful for since there was a 2004 Cancella Cellars Pinot Noir in there... irreplaceable.
Since the OP had a lawfully-checked firearm in his baggage, I assume it was a hardsided bag with a lock. That is impressive that the handler got into it. The enhanced security post 9/11 has now required background checks on baggage handlers and a lot of security cameras in the baggage handling areas. The dishonest handler has only a few seconds to get into a bag and get out. So, a lock is usually enough to cause him to select the next bag.
Oh, and why didn't he take the gun? Because if he got caught with that in the secure area, his head would roll.
There is always some risk when you check baggage. It's gonna get handled by a dozen or more people along the way. But you can insist on locking it with a lock of your choice.