SAN FRANCISCO (KPIX 5) – In anticipation of the Supreme Court’s ruling on union fees Wednesday, California Governor Jerry Brown had already signed bills that tightened up the rules for people opting out of union plans.

Both California Democrats and labor leaders condemned the decision, calling it a setback for working families that will only widen the gap between the wealthy and the middle class.

But there is a reason that California has passed legislation intended to maintaining union membership and boosting influence ahead of the ruling.

Unions stand as one of the biggest sources for power and political financing in the state. A good deal of the influence they exert goes to back Democrats in Sacramento and San Francisco.

Whether it’s Teachers for Gavin Newsom or firefighters helping their candidate for state treasurer, when it comes to politics, public employee unions are some of the biggest players in the state.

Between 2012 and 2017, the California Teachers Association gave $90 million to various candidates and causes. The California Nurses Association gave $8 million and the Service Employees International Union gave $7 million.

Critics say that with money comes power.

“They are probably the biggest source of donations to the Democratic party,” said RNC Comitteewoman Harmeet Dhillon.

Unions play big locally as well.

For example, the San Francisco Firefighters Union’s political action committee spent over $800,000 to help elect London Breed as mayor of San Francisco.

“A big part of the support that I got from the Firefighters Local 798 had everything to do with why I won,” admitted Breed.

Though when asked now that she will also be their boss if she would put their need first, Breed said no.

“For anyone to do that is irresponsible and they don’t deserve to be in office,” explained Breed.

But RNC Chairwoman Dhillon says that in heavily Democratic California, the unions often call the shots.

“That’s why we have pensions that are bankrupting California cities. That’s why we have so many regulations that require 10 people to do a job than in the private sector one person could,” said Dhillon. “It all feeds on itself.”

Democratic activist Christine Pelosi disagreed.

“It should always be the voters who get to decide. Right now it’s big business that gets to call to many of the shots,” said Pelosi.

“The point of labor organizations it to make sure that workers are getting wages, getting the health benefits that they need in order to have a decent living,” asserted Breed.

As a result of that, oft times, public employees — whether they be police, fire or a number of other groups — wind up with pretty healthy benefits including sizable pensions. But in order to keep those benefits, unions will have to maintain their power and keep the money from union members coming in.