Xuan Yuan actually asked a very interesting question.
Male and female body plans differ because of, well, sexual selection (such as reproductive roles and mate choices) and niche divergence (being able to cohabitate because they need different resources, leading to less fighting among mates and more efforts to care for the youngs).
Basically, the most prevalent theory is that male and female body plans are different because of sex (and yes, sex, as in the act) and reproduction.