1580s, "to apportion to someone as his share; to apportion out to others; to enjoy or suffer (something) with others," from share (n.1). The meaning "to divide one's own and give part to others" is recorded from 1590s; also "have a part, get one's portion;" also, of two or more, "to each take a portion."
The sense of "confess one's sins openly" (1932, implied in sharing) is said in OED to be from the Moral Rearmament movement, in which "the sharing of our sins and temptations with another Christian life given to God" was a principal spiritual activity. Share and share alike is attested from 1560s. Related: Shared; sharing.