The term likely arose from the fact that mechanics often get their hands dirty with grease and oil while working on cars.