One Saturday this spring, nine candidates for Marin County, California, superior court judge assembled at a community center in a strip mall. In a mostly empty room, they sat at a table draped in black and all proclaimed themselves to be the most experienced, least-biased, best-suited to fill a vacancy on the 12-member county bench.

It’s an off-putting spectacle, to see would-be judges trolling for votes like D-list politicians. And it’s now being played out in 38 states that elect their judges.