That's a good observation, but given the mobility Muni affords, a kid can't get from one area to another without undergoing significant risks (I used to commute from Ingleside to Pacific Heights to school for example). Would you consider as a ten year old kid alone, using a public bathroom today?
If we can use school test scores, which are about as good a proxy for the state of kid-culture as any, the school district is an entirely different animal on the east and west sides. On the east side the schools are almost unversally as dismal as in Oakland. On the west side they are about what you would expect in Novato.
Lincoln is no Marin County school, and neither is City College. Lowell is the exception.
Also note that SF has the best public high school in California, Lowell, better than those in Palo Alto, which is one of the best in the country as a whole. The Lowell graduating classes I've seen (my wife is an alumna) are so impressive in their intellectual horsepower as to be almost scary. I would be very proud to have my children go to Lowell.
I went to Lick Wilmerding when it was still tuition-free. That's the elite school (especially if one is Jewish), or St. Ignatius (if Catholic).
The main reason I think the sickos got in was that the old mainly Catholic ethnic residents moved out to the suburbs. These politically active people formerly voted in rational governments. When they left they were replaced by a combination of politically inactive Asians and an assortment of malcontents from across the US, who achieved power by default.
Many moved out to save their kids from the '60s drug culture. Others left to retire somewhere cheaper (remember the skyrocketing property taxes before Prop 13). It went downhill steadily ever since George Christopher was mayor, the last Republican (and a RINO). Alioto made it look better than it really was.
The city has always had a large gay population, even in the '50s. They started getting militant with the "sexual revolution" of the '70s. It was part of the deal, planned long before Kinsey. The communists proposed using sexual fixation and homosexuality to destroy the West as early as 1919.
This happenned in Chicago and Philadelphia as well. Here in New York, it also happened to a lesser degree as the "ethnic Catholics" had a Staten Island to flee to within the city limits.