Outside, a talented singer crooned Otis Redding’s “Sittin’ on the Dock of the Bay.”

I wasn’t watching ships, but I saw deep-pocketed folks waltzing into City Hall. The party was paid for by new tech overlords like Twitter, along with old school money like Wells Fargo Bank. There were those currying legislative favor like PG&E and lobbyists on behalf of the aforementioned ilk.

Mayors from around the country joined Mayor Lee and those monied partners in City Hall. The U.S. Conference of Mayors, held over the weekend at the Hilton Union Square Hotel, was paid for by Uber, Lyft, Google and WalMart.

Former (current?) Mayor Willie Brown emceed the party, as he’s the wizened-wizard who conjured the gold paint encircling City Hall’s dome.

How’d our fashionable former mayor raise the money for fancy flourish? He clued us in in his Sunday Chronicle column “Willie’s World.”

After politically fast-tracking a development for an architect who donated money to paint City Hall, Willie wrote, “It wasn’t long before every developer with a pending project realized that the quickest path to the front of the approval line was to come in with some gold leaf for City Hall and a paintbrush.”

Ah, Willie. He’s so charming he could pick your pocket, stare you in the eyes and say, “I’m picking your pocket, nice to meetcha,” and you wouldn’t mind. You might even name a bridge after him.

This is, in fact, a City Hall tradition.

The 1906 earthquake and fire that decimated San Francisco’s first City Hall gave rise to one of The City’s most notorious political scandals: The trial and sentencing of political boss Abe Ruef, and then-Mayor Eugene Schmitz.

The earthquake revealed shoddy workmanship in San Francisco’s infrastructure, a thread that led investigators up the political food chain to expose a system of massive corruption and bribes among city supervisors and the mayor.

As the Examiner reported in a recent historical retelling of the scandal, Ruef orchestrated a takeover of the City Hall machine by ensuring the puppet-like Eugene Schmitz, a political neophyte, was elected mayor. Soon Ruef was ordering giveaways of public assets to powerful corporations in exchange for loyalty and bribes — while San Francisco was trying to resurrect itself from the disaster.

But the twisted genius of our local modern political system is that big money worms its way into City Hall — without (necessarily) violating the law.

Brown engineered this by creating a “patronage army” of more than 350 mayoral “special assistant jobs,” according to news reports at the time. He took millions in soft money contributions after his political allies weakened municipal campaign finance rules in the 1990s.

Those weakened campaign finance rules now benefit Mayor Lee. Reports from SF Weekly and the Examiner, plus the Chronicle, show Mayor Ed Lee has taken nearly $10 million in “behested payments,” which critics say work like this: Fund this pet project of mine (like Free Muni for Youth), and perhaps I’ll help you secure that tricky contract.