California legislators are taking a major swipe at the gig economy.

Last week, by a 55–11 vote, the state Assembly passed a bill called AB 5. The legislation makes it the default assumption that workers who perform services for hire are not independent contractors but employees. The company hiring them therefore must abide by all sorts of employment regulations—everything from paying into the state's unemployment insurance fund to tracking hours for overtime purposes.

"Big businesses shouldn't be able to pass their costs onto taxpayers while depriving workers of the labor law protections they are rightfully entitled to," says Assemblymember Lorena Gonzalez (D–San Diego), the bill's sponsor, in a statement released after the vote.

The bill, which now heads to the state Senate, is intended to codify the 2018 California Supreme Court decision Dynamex Operations West, Inc. v. Superior Court of Los Angeles, which ruled that all service-for-hire workers are employees unless they can prove otherwise via the "ABC test."

The ABC test says that people are independent contractors only if they are "free from control" from the direction of their hiring entity (meaning they can decide when to work and what jobs to take), if they are performing work outside the normal scope of the entity hiring them, and if they are customarily involved in the work they're being hired to do.

Prior to the decision, gig economy companies classified their workers as contractors, on the grounds that they aren't given set hours or schedules like normal employees. If you're performing rides for Uber or dropping off meals for DoorDash, it's up to you when and how much you want to work.

That's not enough under the Dynamex decision. To satisfy the court's ABC test, for-hire workers must also be doing work that is outside the normal scope of the company that's hiring them. If a delivery company is going to hire contractors, for instance, they can't be put to work delivering packages.

Since the Dynamex decision came down, there has been a lot of confusion about what it would actually require of companies. AB 5 attempts to clear things up by explicitly stating that all of the state's labor regulations apply to workers considered employees under Dynamex.

Rideshare companies are strongly opposed to the bill, warning that it will raise prices for consumers and force them to give their new employees more regimented schedules. Lyft issued a statement saying its drivers "overwhelmingly prefer the freedom of working where, when, and how much they want. Many are moms, students, seniors or veterans and 75% of them drive less than 10 hours a week." The company adds that AB 5 "would force ridesharing drivers into shift work, eliminating the control drivers currently have over their own schedules."

Jarrett Dieterle, a fellow with the free market think tank R Street, similarly argues that the mass reclassification of contractors as employees risks destroying the flexibility that has made gig-economy work so valuable for so many.

"Most workers who become freelance contractors or join gig economy platforms do so to smooth income volatility. They are facing unexpected large expenses or a sudden reduction in household income," writes Dieterle. "Forcing contracting firms to reclassify workers as employees would make this quick access to supplemental income more complicated."

According to an analysis performed by R Street, codifying the Dynamex decision into state law would foist some $6.5 billion in additional payroll expenses onto Californian businesses annually.

The authors of AB 5 have tacitly acknowledged the sweeping changes the bill will create through the exemptions they've included in the legislation. The bill exempts health care professionals, insurance agents, stock brokers, and hair stylists (most of whom work as contractors).

More carveouts may follow. Gonzalez described her bill as "an important work-in-progress." The San Francisco Chronicle reports that many legislators who voted for the bill expect more changes to be made in the Senate to limit its scope.

In part, this is a problem created by the courts, not the state legislature. But lawmakers are leaning in to the problem by forcing contractors to abide by the state's voluminous employment regulations. They should be trying to undo the damage done by the decision instead.