Maybe it's just one of those electrical glitches? Isn't the transmission an electronically-controlled one?
Just a rough guess..
I don't truss my old diesel's transmission so I always just use the parking brake...
well good luck! Hope it won't happen again