This is because, both door locks have a sensor on them.
Clearly, the one in the drivers door has either come off/broken, so if you are locking from the passenger side where it works, and then unlocking from the drivers door which doesnt, the alarm doesnt disarm.
Take the door card off and you will see the sensor either clipped around the lock, or possibly hanging off....