What happens if your car locks by itself?

So my car/van(Honda) locked by itself, but i think I locked it without knowing, I'm not sure. But it locked.So when I started to drive, It started beeping endlessly. I couldn't get it to shut up, until a couple of tries, but I didn't know what I did to stop it. Please Help? Does every car do that? How to stop it?

My car has an automatic locking feature so it locks itself up after 5 minutes if it can't detect the key fob. I expect mine to lock by itself

Maybe there's a wiring issue or an issue with the central locking controller especially if you have some type of aftermarket system. Possibly short circuiting. It's also possible that the key fob was pressed without you knowing. I'd have it checked out.