Why does washing machine not empty tub when finished, but instead start any program by emptying it?
The program probably empties the tub both before AND after a cycle. That way, if you terminate a cycle in the middle (e.g. power loss), and then start a new cycle, it will empty out any remaining water before it continues.

The few hundred ml of water that comes out at the beginning is probably because at the end all the water ran back down the pipe and pooled around the outlet, priming the pump and getting it ready for another blurp of pumping (technically speaking).