They could still have locks on the doors, but the locks would be to keep people out of the hotel rooms, not out of the bathroom.
I believe the parent is suggesting that the two rooms adjoining the bathroom would be mutually accessible when they shouldn't be.
Yes, so you have a lock on the door that you can only manipulate from your room. Unlock it when you need to use the bathroom, lock it otherwise.
This of course doesn't allow you to lock the bathroom when you're in it from other people also in your hotel room. Although this is certainly much less of a concern.
so then you need to remember to bring your hotel key into the bathroom.
Why? It’s not a key, just a lock you open/close from inside your bedroom into the shared bathroom. Once you are in, you can just walk back into your room unless someone in your room on purpose locks you in.