What are the differences between men's and women's bike frames? Why do women's bikes have a diagonal bar in the frame instead of a horizontal frame? Is this the only difference?

Sorry if this has been asked (but I cannot find it by searching) and I also just cannot think of a reason why.
Way back when safety bikes were becoming popular, women wore skirts. Skirt lengths were to the ankle. The dropped top bar made getting on possible while maintaining respectability. Women were considered too fragile to risk hitting the top tube, hence the slanted bar. The trend continued even long after women stopped riding in long skirts.

Modern WSD (women specific design) geometry differs from conventional bike geometry. The difference goes beyond just size. Whether it is needed depends on who you ask. While some women may be smaller than the average male, many are as tall; height is not the only issue. Many women have a different leg to torso ratio than the male average and the frames are built to fit that difference. This is not to say that a women needs a female specific frame or that a male wouldn't fit on a WSD frame. It all depends on the individual physical traits of the rider.