I really don't think that women only schools in Japan are to promote chastity. Japan has been and largely remains a male dominated society. Men are encouraged to be active and assertive, and women, not so much.
Girls only schools are a way to help foster confidence and assertiveness in women, as there are no boys to lead the way. I think this is the main reason for them, speaking only from my "gut".