The origination of male circumcision is not known with certainty. It has been variously proposed that it began as a religious sacrifice, as a rite of passage marking a boy's entrance into adulthood, as a form of sympathetic magic to ensure virility or fertility, as a means of enhancing sexual pleasure, as an aid to hygiene where regular bathing was impractical, as a means of marking those of higher social status, as a means of humiliating enemies and slaves by symbolic castration, as a means of differentiating a circumcising group from their non-circumcising neighbors, as a means of discouraging masturbation or other socially proscribed sexual behaviors, as a means of removing "excess" pleasure, as a means of increasing a man's attractiveness to women, as a demonstration of one's ability to endure pain, or as a male counterpart to menstruation or the breaking of the hymen, or to copy the rare natural occurrence of a missing foreskin of an important leader, and as a display of disgust of the smegma produced by the foreskin. It has been suggested that the custom of circumcision gave advantages to tribes that practiced it and thus led to its spread. Darby describes these theories as "conflicting", and states that "the only point of agreement among proponents of the various theories is that promoting good health had nothing to do with it." Immerman et al. suggest that circumcision causes lowered sexual arousal of pubescent males, and hypothesize that this was a competitive advantage to tribes practising circumcision, leading to its spread. Wilson suggests that circumcision reduces insemination efficiency, reducing a man's capacity for extra-pair fertilizations by impairing sperm competition. Thus, men who display this signal of sexual obedience, may gain social benefits, if married men are selected to offer social trust and investment preferentially to peers who are less threatening to their paternity. It is possible that circumcision arose independently in different cultures for different reasons.
So there you go. We don't really know, but it's unlikely to have been for hygiene reasons.