any engine which runs at high RPM (pistons)and high temperatures(HPC+HPT)
needs cool down period, depanding upon the type of operation.
this cooling is required for uniform cooling of the various sections of the engine to minimise thermal stresses due to high RPM/TEMPERATURE ops.
during cool down oil helps to distribute the heat uniformaly around.
and also oil gives a uniform coat of layer between the parts/bearings to eliminate metal to metal contact/binding/sealing between the parts.
so that next engine start is facilitated and engine life.
oil also removes the contamination to the sump during the shutdown process and it helps the lab analizer (lab technician) to to determine engine health.
cooking oil is not used in aviation
oils in aviation are cirtified for large range of parameters