Perez lost the race by .01% and conventional election wisdom considers that any race that's within 0.50% is worth a recount. And Perez may have won in a statewide recount because the race was that close. There is no mechanism for a statewide recount. So Perez was on the hook for paying for the recount and he certainly couldn't afford to pay for it statewide. Look at how much cash he burned through just paying for select precincts in two counties. This has caused people to call for election law changes to have an automatic recount paid for by the state with an election this close.
So Democrat Betty Yee advances to face Republican Ashley Swearengin. Yee is a decent, but unspectacular candidate, whose strength is in the Bay area. I know some people think that Democrats winning a statewide office is automatic but Republicans have won a statewide office in every election except 2002 and 2010. In both those years the GOP lost races by less than 1%. So it'd be unprecedented if there isn't a race that Republicans at least finish less than 1% behind the Democratic victor. This race would seem like the best GOP hope.