The machine most likely had time left from the previous load, so when the door was closed again it restarted.
Not likely. These kinds of machines won't unlock at all until the cycle is done or before the cycle is cancelled. If you cancel the load, it drains the water out first, so you have to start over again.