There are few things more alarming than having someone try to get into your motel room in the wee hours of the morning. Usually it's wrong room situation. One time I had someone insistently jimmying the knob of the door from the adjoining room, trying to find a place to be alone with his equally intoxicated lady of the night. One it was someone who couldn't sleep--I snore loudly.
Never have had a gun when that happened but I sure would have felt safer.
Can't fault you for your actions.