Reading this, I realize that I've always equated a door handle jiggle with a knock. Someone's trying to find out if the restroom is occupied. I've always felt the need to say something to indicate that it's occupied.
I figure the person outside might not realize that it's one open room and not a restroom with stalls, so they might not understand why the door is locked. In fact, I figured that's why they were trying the handle, because if they knew it was a open room type of bathroom, they'd knock.
But apparently there is this code that if the door handle is jiggled, no response is needed? I had no idea. EHell is indeed educational.