You are quite right, the oil also serves to transport the heat away.

It's a solvent also.

Oil also keeps the gaskets (e.g. valve cover gasket, water pump) and seals (front and rear mains) pliable.