Exactly. Lots of people don't realize that most of their door locks are there to keep "normal" people out, because dedicated criminals are typically going to find a way in.
Locks reduce the instances where dishonest people can exercise dishonestly without repercussions. But that's what much of life is about, reducing the occurrences of negative outcomes. Elimination often isn't possible or feasible.
This is a much more accurate than the old "Locks keep honest people honest" saying.
If you consider yourself an honest person, ask yourself how many times you've tried to open doors to random houses as you walk down the street. If you found it unlocked, do you rob the place?
If you need a lock to keep you honest, you may want to reevaluate your values.
The phrase is rooted in a very old memeplex, the part where religious morality and sociopathy overlap. Most ideas revolving around the concept of "putting the fear of God into someone" aren't actually for regular people with empathy. They're for sociopaths. It seems that sociopaths used to be seen as just completely normal people, undifferentiable from everyone else—and much of "morality" is actually an attempt to create extrinsic incentive systems to replace the thing that sociopaths lack, so they can seemingly function normally.
That's all to say, by analogy: locks are to keep honest-acting sociopathic opportunists honest-acting.
Right, you're exactly right, but you also seem to know a bit about sociopaths, and so it surprises me that you are implying that we don't see sociopaths as normal people these days. I've had very personal run-ins with real, genuine sociopaths in my life, and most people just have no idea that there are these people just totally walking around being treated like normal human beings. Sociopaths are not human beings, I say, because what is humanity but our empathy? And sociopaths do not have it, ergo...