In order to understand why California’s new Assembly Bill 5, which has now passed both houses of the state legislature, is such a bad idea, you have to separate Uber the idea from Uber the company. That’s because Uber the idea is one of the most innovative transformations in the workforce since maybe labor unions. Which is ironic considering that unions are by far the biggest opponent to Uber the idea and Uber the company.

Uber the company, on the other hand, wouldn’t be at the top of anyone’s “best places to work” list for a variety of reasons. It, along with rival Lyft, has serious problems with the way it treats drivers and neither company has found ways to make money. That’s despite the fact that their only expense seems to be spending on lobbyists to make sure normal regulations don’t apply to ride-sharing companies.

This law, when signed by Governor Gavin Newsom, would codify California’s standard for determining whether an individual is a contractor or an employee in such a way that pretty much everyone who provides services would now fall under the “employee” categorization.

I’ll just say it as clearly as I can: this law is a solution to the wrong problem.

Uber the Idea

To understand why, go back to the idea for a minute. The gig-economy has provided opportunities for millions of Americans to make money. That’s not the same as having a “job” but that’s the point. Many gig workers have other jobs, and many of the ones who don’t are in school or want to work part time to make a little extra cash.

In Uber’s case, they provide their own cars, insurance, and gas, and set their own availability. In return, Uber markets their app, which connects people who need a ride to drivers who are willing to take them wherever they want to go.

The reason the “gig economy” took off is because of the freedom it provides people who are willing to hustle to make extra money. You could set your own hours, accept rides when you had free time, and not worry about an employer having that control. If you’re an employee, you might get benefits, but you lose that freedom and control.

And for that freedom, millions of drivers signed up. They carry millions of passengers every year.

The idea is brilliant. And it’s about to die–mostly because of Uber the company.

Uber the Company

Uber the company gets credit for inventing the gig economy, though that’s a little generous. In reality, it’s just the most prominent example of a company that built a massive platform around untapped supply and unmet demand–and found an innovative way to monetize the connection between the two.

I reached out to Uber the company but did not immediately receive a response.

Seriously though, Uber’s drivers have every right to be upset with the company. I wrote just this month about how the company says publicly that it takes a much smaller percentage of fares compared with what drivers are actually receiving. The company is also spending enormous amounts of cash on autonomous vehicle research in order to one day do away with those pesky human drivers altogether.

Uber the company isn’t brilliant–it’s broken.

Solving the Wrong Problem

But classifying the hundreds of thousands of drivers and delivery personnel that accept assignments as employees doesn’t actually fix that. Not only that, but this change will go far beyond just ride-sharing and food delivery options like UberEats and DoorDash.

According to Michael Droke, a labor and employment attorney at Dorsey & Whitney, “This law is intended to convert thousands of gig economy workers to employees. While Uber and Lyft come to mind, this law applies to any independent worker in California,”

Look, Uber isn’t a perfect system, there’s no doubt about that. But it is the system that both drivers and riders sign up for. It’s the system that everyone involved willingly agrees to participate in. The problem is that Uber keeps changing the rules in its own favor, to the detriment of its drivers–and arguably its riders as well.

That’s what California–and the other states sure to follow–should focus on fixing.

But they aren’t, largely because of pressure from unions who backed AB 5. John Costa, International President of the Amalgamated Transit Union says that Uber and Lyft “have failed to grant their drivers basic workers’ rights by denying them a livable wage, affordable health insurance, overtime pay, retirement plans, workers’ compensation coverage, unemployment insurance and the right to join a union to collectively bargain on their own behalf.”

I don’t know anyone who wouldn’t agree that Uber and Lyft have serious problems. They mistreat their drivers, can’t seem to make money, and their primary business expense seems to be spending money on lobbyists who campaign to pass laws giving them a free pass on pretty much every regulation other companies face.

But–and this might be unpopular to say out loud–people don’t sign up for gigs because they’re looking for health insurance, overtime, and a retirement plan. A gig means freedom, extra cash, and a chance to have control over when and how you work. Those other things are all important, but if that’s what you’re looking for, you look for a job, not a gig.

Don’t kill one just because you think it should be the other.

The opinions expressed here by Inc.com columnists are their own, not those of Inc.com.