If there’s one thing the California government is good for these days, it’s failing to address crises that glaringly exist while creating new crises that shouldn’t exist—and then shifting the blame when everything goes wrong.

A new California law set to go into effect in the new year is the latest example of misguided legislation hurting the very people it was aimed to “protect” in the Golden State.

The law, Assembly Bill 5, puts severe restrictions on who is qualified to be an independent contractor or freelancer. The law puts heavy restrictions on how much work freelancers can do before being considered full-time workers.

The legislation was passed to reduce the negative impact of the “gig economy,” where workers do various jobs on their own time but don’t get the benefits or long-term employment guarantees of a traditional, full-time job.

The problem is, it appears that instead of aiming to hire more full-time workers, companies are simply getting rid of freelancers and independent contractors in favor of a smaller number of full-time employees.

Of course, the freelancer law has major implications for ride-sharing services like Uber—which is battling the law and working with other companies to amend it with a ballot initiative—but it’s having a huge impact on freelance writers in particular.

Vox Media, which supported the new law, announced that it would be doing away with most of its California contractors who provide content for its sports websites on SB Nation.

“In the early weeks and months of 2020, we will end our contracts with most contractors at California brands,” SB Nation Executive Director John Ness wrote in a post, according to Fox Business.

“This shift is part of a business and staffing strategy that we have been exploring over the past two years, but one that is also necessary in light of California’s new independent contractor law, which goes into effect Jan. 1, 2020.”

There’s no question as to where the problem lies: The new law limits freelance contributions to 35-a-year to a single company, which in many cases is a tiny number for freelancers.

Billy Binion, writing for Reason, pointed out what this means for writers: “The 35-piece per publication limit comes out to less than one piece per week. Anyone who writes a weekly column, for instance, is likely out of a job if their publisher cannot hire them as an employee.”

Businesses and publishers in general now have an incentive to stay away from California workers and writers.

“If I’m a publisher from out of state,” said David Swanson, a San Diego writer who is the outgoing president of the Society of American Travel Writers, according to the Los Angeles Times, “and I have a choice of hiring a writer from California to do a job, or somebody from Colorado or Texas or Canada or India—and I’d have no chance of being sued—who do you think I’m going to hire? AB 5 simply makes it unattractive to hire writers from California.”

The gig economy might not be the best arrangement for everyone, but needlessly killing thousands of jobs is the last thing California lawmakers should be doing. The impact on businesses will likely be bad, but for those now out of a job in the new year, it will be far worse.

For many, the flexibility of independent contract work is highly appealing and in some cases necessary.

As Laura Baxter wrote for The Federalist, the law could fall particularly hard on parents, students, and the disabled. For others, freelancing is an important supplement to income that will now be lost.

And for those who pursue the dream of writing for a living, freelance work is often the only opportunity to do so. With this law, many California writers are now being forced to choose between ending that dream or leaving the state.

California, the richest state in the union, is seemingly perfecting the art of encouraging mass homelessness and putting people out of work. (And right behind it is New York, which may soon be adopting a similar law.)

Instead of blaming their problems on President Donald Trump, maybe California leaders ought to reexamine the broken ideology that has caused their state—which has every advantage of wealth, climate, and geography—to become a national laughingstock whose residents can’t get out fast enough.