The small spring provides a little tension, a little friction, for when the gear is fully retracted. Parked. To keep it back there, away from the flywheel ring gear.
The notch makes the gear heavier on one side than on the other, so that when the starter motor shaft spins, the heavy side of the gear tends to stay down and make the gear NOT turn with the shaft, until the teeth engage in the ring gear and the gear has spun all the way in on the spiral. Then the gear turns with the shaft and turns the flywheel.
.