Legal in California: You earn 2 vacation days per month, to a max of 24. Hired in January, never use PTO, by December you have 24 days banked. In January you fail to earn PTO because you hit the cap. Total balance at end of January: 24 days banked.
Illegal in California: You earn 2 vacation days per month, and they are "use it or lose it." Hired in January, by December you have 24 days banked and never use them. The next January, your existing PTO balance is set to 0 and you are not compensated for the unused days. Balance at end of January: 2 days banked.
The legal distinction is that your employer can decide not to give you PTO for any arbitrary reason (there is no legal requirement to give any at all), but they cannot take back PTO that has already been paid out.