I've found out recently, that, much to my surprise, prostitution is not a historical inevitability. In areas with equal numbers of men and women, low immigration and emigration, and small communities (everybody knows everybody), and values systems that support long-term monogamy, prostitution has historically been very low, almost to the extent of being completely absent.
However, in the presence of standing armies (concentrations of young, unattached men), cities (you don't know your neighbor so you don't police their behavior), and high mobility (again, you don't know your neighbor), prostitution becomes an inevitability.
Personally, I think prostitution can be a moral good, because it can give economic value to something that men have taken as a given in some historical situations. But it's pretty hard for prostitution to be a moral good when it's illegal, and I admit that it is often a moral bad, especially for people who have family or cultural prohibitions about it, and because it can contribute to and support sexism. However, my personal take is that it's the social setting and expectations that make prostitution problematic, not the act of exchanging sex for money. And I think it's enormously hypocritical for people who support the existence of stay at home mothers, or having men pay for women's dinners or give women jewelry, to have problems with prostitution. In fact, I think that the partner who stays at home should not be of one gender more often than the other gender (my dad was a much better stay at home parent than my mother), and that men should not pay for dinner any more often than women, and all of that stuff.
But I'm also an adamant No on 8 voter, and think that more places should be like San Fran (not that I've spent much time in San Fran), so my opinions shouldn't surprise anyone.