I'm not sure about the fault with the system, But I'll explain how it should behave & you may (or may not)guess what has gone wrong.
1. When you lock the car wit security and then you unlock the car using remote, u failed to open a door for a while, then the car is aotomatically locked. (it thinks you have opend in accidentelly).
2 when you have startd moving and then you press the brakes, doors get locked.
3. When you stop the engine,it will unlock all the doors. (but if you have opened a door manully before switch off the engine, ths will not be happened.)
4. If the fuse of your brakes has burnt due to some other reason, or has some loose connecion then the above 2-3 may not functon poperly.
5. If your remote has some bad contct points for the buttons, then it may trigger sials without your knowledge.