Like all other body parts, it has a purpose for being there. It's first task, during infancy, is to protect the glans from infection by shielding it from bodily waste and other types of exposure. The penis is an internal organ. Throughout life, the foreskin is a protective jacket, which guards against trauma and injury. It also keeps the glans soft and moist.
All mammals have a foreskin.
This site removes any doubt that the foreskin plays a substantial role in sexuality . The page also lists the 12 Functions of the Foreskin clearly eliminating the common belief that the foreskin is just a small piece of skin with no purpose. Circumcision completely exposes the glans. On occasion, a male is born without a foreskin. This abnormality, called aposthia, occurs very rarely.