> at best locks are meant to prevent of crimes of opportunities
A lock forces the thief to either spend time defeating it or physically break something. Even if it doesn't slow him down it should hopefully make it visibly obvious that he's doing something illicit.
IIRC there's a legal distinction between mere unauthorized entry and unauthorized entry that involves circumventing any kind of lock