Yea, adults shouldn't have bathroom emergencies but the reality is that they do. There's no reason you can't open the door for someone. I mean if everyone starting asking then it would be a problem. Your supervisor is being kind of ridiculous and stubborn. It's not really lecture worthy. If anything it's just don't do that again worthy.