In most of the cases that I am aware of, the teachers union negotiated retirement benefits. They would have preferred a pay increase. They settled for retirement benefits, as a kind of delayed payment for their services.
At least here in New Hampshire, teachers are part of the New Hampshire Retirement System, and the benefits are what the state says they are. The teachers don't get to negotiate with the School Boards for that like they do for salaries (and other benefits).