Handbrakes don’t just fail by braking…on lots of cars the handbrake acts on the brake disc instead of a separate drum. So when you parked up with hot brakes, the disc contracts as it cools, and the handbrake starts to release.
If you walk up a steep hill, its amazing how many cars are out of gear with the wheels straight. Even residential streets where the drivers park there every day. (I live on one…drive is even steeper so my van gets double chocked with big rubber wheel chocks)
I tried releasing the handbrake on our car and started turning the engine over until it was merrily chugging down the drive in 1st gear!)
(our insurance company actually quoted a cheaper premium for on street parking, they didn’t understand but I know its because the road in our postcode crosses the hill and is only a gentle incline, but all the drives are about 1 in 4. Lots of claims for cars rolling off driveways!)