As an emulsifier, allowing the fats and the water to mix better. I _think_ it also might help to trap air bubbles. It helps you turn on the creaminess-knob

Egg yolk is the usual emulsifier, in the UK at least - ice cream is essentially a frozen whipped custard.

That’s also an option. I usually make mine without due to friends with egg allergies and vegan friends