The primary function of sweat glands is to secrete water to the skin surface, where it cools the body by evaporation.
The primary function of oil glands is to protect the skin. These glands by secreting and producing sebum, lubricates hair and skin in the mammals. Huge amount of sebum is helpful in protecting our skin from water and it also assists in controlling the microorganism growth on the skin.