From my experience, it's possible to hate the high school/college years, but for them to also be comparably less terrible than what comes after, and so to look back at them with a strange kind of longing.
Like someone else in the thread said, they might have been miserable, but they had potential, options, future ambiguity. After a certain point, those narrow and solidify. A miserable past where the future wasn't set feels more glamorous than a miserable present railroaded into a miserable future.