In the United States, habitual offender laws have been implemented since at least 1952, and are part of the United States Justice Department's Anti-Violence Strategy. From Wikipedia
The sentence stems from California’s Three Strikes Law following his conviction on more than two dozen felony counts.