Why does it seem like San Francisco and Portland have more far-left weirdos per capita? The West has always been America's most ideological part of the country, being disconnected from the structured establishments and hierarchies of the East Coast
San Francisco wasnt always left wing:
https://www.sos.ca.gov/elections/celebrating-womens-suffrage/california-women-suffrage-centennial
But on Election Day, October 10, 1911, the measure was soundly defeated in the San Francisco Bay Area and just barely passed in Los Angeles. Disheartened and disappointed, suffragists began to plan yet another campaign when late reports from the far flung counties began to swing the vote in their favor.
When the long count was finally completed several days later, Equal Suffrage had passed by only 3,587 votes – an average majority of one vote in each precinct in the state! The final tally was 125,037 to 121,450. As suffragists had hoped, work in the rural districts successfully overcame the more organized opposition in the cities. With the passage of votes for women in California, the number of women with full suffrage in the U.S. doubled, and San Francisco became the most populous city in the world in which women could vote.
Also neither was Portland:
https://www.theatlantic.com/business/archive/2016/07/racist-history-portland/492035/
SF and Portland becoming left wing was a product of the 1950s and 1960s
San Francisco had its problems with racism and old-school anti-Semitism through at least the 1950's. Baseball star Willie Mays had a hard time finding a place to live in SF when the team moved there in 1957. When a (Jewish) real estate agent then tried to help him find a place, the agent was deluged with anti-Semitic letters and phone calls.
https://www.sfchronicle.com/chronicle_vault/article/Chronicle-Covers-When-Willie-Mays-was-denied-10518685.phpand portions of his authorized biography: Willie Mays: The Life, The Legend