Hazrat Anas (Radiallahu anhu) reports, "Sayyidina Rasulullah (Sallallahu alaihe wasallam) often rubbed oil in his head and also often combed his beard. He put a cloth over his head, which became like an oil cloth due to the frequent use of oil."
The clothing becomes oiled due to the use of oil, and this was against the noble habit of Sayyidina Rasulullah (Sallallahu alaihe wasallam), who liked cleanliness. He put a cloth over his head so that the amaamah (turban) etc. did not become stained.