This is not how the three-strike law works. You don't get a life sentence for petty theft.
Under Penal Code section 667(e), you can receive a life term if you are convicted of a serious or violent felony AND you have twice before been convicted of serious and violent felonies. See https://leginfo.legislature.ca.gov/faces/codes_displaySectio...
That is how the law works after it was amended in 2012.[1] From the time of adoption in 1994 until 2012, even relatively minor crimes could result in a life sentence.[2]