Please don't conflate State Public Employee retirement systems with State Teacher retirement systems. They each have their own rules.
The teacher retirement systems I know of have rules like (age + years_worked)>=80 ==> full pension benefits.
Retiring after 20y will earn you a smaller monthly and is only possible (under that rule-of-80 above) if you start teaching at age 40. Teachers are much more likely to retire after 25+y (age_start=30, age_retire=55).