The function of the oil seal is to stop whatever fluid is inside from leaking out the clearance between the shaft and housing. The seal may also be used to prevent outside materials, such as dirt, from moving in through the clearance.