The process of how and why the term originated falls under what etymologists call metonymy.Determining whether the driving force behind the process was some deep-seated collective ill-will toward the entire female gender, or a simple desire for a shorter word than "female student" and the fact that "coed" is catchy would require a hell of a lot more justification.One early Cornellian recalled, "We were called 'co-eds'..we should have been much more touchy than we were to mind it." In a humorous column for the , another student recalled that on her first day in Ithaca, "a boarding house keeper, of British birth, asked me if I were a a 'co-hed.'...'Co-head'! But the attitude of our British friend was not so far remote from that of out student brother; to both a coed (A co-head) is an anomaly, a monstrosity." . Webster's estimated date of first use—1878—is in keeping with the above excerpt.Etymonline's estimate is off by a couple of decades.But this doesn't explain why only females are called by this term.As an adjective, the word coed, short for coeducational, indicates an institution that teaches both males and females.However, as a noun, it can only mean "a young woman who attends college". I don't think it's so much that "early students were all male" but that "early colleges were single sex." I suspect it is because the idea of a woman playing a man's role is so much more jarring than the reverse, from a sexist point of view, that a "co-ed" is a woman going to a mixed-sex college rather than a "co-ed" being a woman or man going to a mixed-sex college.
There are a few other sources that also cover this topic; but all they do is parrot the (correct) dictionary definition rather than provide any real insight into the why and how of the question.
That's a historical account of how some students responded to the term, not a etymological account of how the term originated or why.