I don't see any obvious flaw that could explain the robbery.
A few advices :
You should never have master keys with you or inside your claim, make an alt and securely store theses with him.
Make visitor airlocked entrances, opening towards the outside. The exterior gate is a normal one, and the interior one should be a visitor.
Replace your locks asap with a new lock/mastery key pair, throw your exisiting ones.
There could be only 2 things happenning that coudl explain the theft, in both cases, you don't have enough perception * int to see the scents (make sure you are tracking scents in the toggle menu) :
- you lost a copy of your master key, someone came in and robbed you
- you let the gates openened, that can happen sometimes.