A lock isn't part of the gear I carry routinely while commuting, although sometimes I add one Ortlieb pannier and a u-lock and cable if I know I will need to stop somewhere and/or carry something.
I usually don't do spur of the moment errands during my commute unless it is a place where I feel like I can just bring the bike in.
Surprisingly few places object when I just waltz in with the bike, too.
__________________
---
San Francisco, California