Recently there has been a video going around demonstrating how hotel door locks can be defeated by a large rod, kind of like the slim-jim bars that car thieves use to break into car doors. The funny thing is that they explain how the doors can be “secured” using a towel to prevent the attack.
The best bet here is to never assume that your hotel door lock is secure. All sorts of people have access to your room, starting with cleaning staff. There are also lots of other ways to defeat hotel door locks including traditional lock-picking and key card magstripe locks.
This is why they give you a hotel safe in your closet. Oh wait, people can trick hotel staff into opening the safes or just use a paper clip.