To understand the AB5 law, Wikipedia explains it simply…

“California Assembly Bill 5 or AB 5 is a California law which limits the use of classifying workers as independent contractors rather than employees by companies in the state. Employees are entitled to greater labor protections, such as minimum wage laws, sick leave, and unemployment and workers’ compensation benefits, which do not apply to independent contractors. Concerns over employee misclassification, especially in the gig economy, drove support for the bill.

It was introduced by California assemblywoman Lorena Gonzalez and endorsed by Governor Gavin Newsom.It was approved by the California State Senate 29-11 on a party-line vote, by the Assembly by 56-15, and signed by Governor Gavin Newsom in September 2019. It will take effect January 1, 2020.

The law codifies a stricter set of requirements laid out in a California Supreme Court decision regarding the classification of employees. The bill was supported by many labor leaders, unions, rideshare driver groups, and state Democrats. It was opposed by state Republicans, the California Chamber of Commerce, and gig economy companies Uber, Lyft, and DoorDash, which pledged to spend $30 million each on a 2020 ballot initiative to reverse AB 5. After its passage in the legislature, Uber and Lyft both said they planned to keep drivers classified as contractors, saying they could pass the stricter test.
Provisions and history
On April 30, 2018, the Supreme Court of California ruled in Dynamex Operations West Inc. v. Superior Court of Los Angeles to impose stricter requirements for employee classification. It created a 3-part test to determine whether an employee could be classified as a contractor rather than an employee, commonly known as the “ABC” test, replacing a previous 11-point standard set in 1989 (the Borello test).

The proposed bill, introduced in December 2018, codifies the ruling and puts the burden of proof on employers to satisfy the three part-test that must be satisfied for a worker to be classified as an independent contractor:

(A) if the worker is free from the control and direction of the hirer in connection with the performance of the work, both under the contract for the performance of such work and in fact
(B) if the worker performs work that is outside the usual course of the hiring entity’s business
(C) if the worker is customarily engaged in an independently established trade, occupation, or business of the same nature as the work performed for the hiring entity
All three conditions must be met.

The law also gives cities in the state the right to sue companies for violating the law, where previously they could not. The California Attorney General’s office and local prosecutors can also sue companies.

Proponents of the bill said it would give workers previously classified as contractors minimum wage, overtime, sick leave, unemployment and other benefits, and prevent the state from losing $8 billion from payroll taxes that independent contractors and companies who use them do not pay and social benefits required due to lower pay. Opponents said it would increase labor costs by up to 30%, create higher costs for customers and reduced service, and reduce flexibility for workers.

After discussions and amendments to the law, which primarily included exceptions for certain professions, the bill first passed the Assembly in May 2019. In August 2019, as the bill neared passage, gig economy companies Uber and Lyft also proposed a negotiated $21 minimum wage but to keep employees as independent contractors as an exception. The proposals were not accepted by the legislature. Other amendments and exceptions were made, primarily to exclude particular professions. The bill drew national attention, including the support of multiple 2020 presidential candidates.

see https://en.wikipedia.org/wiki/California_Assembly_Bill_5_(2019).