There are a few things that make High School anime popular, that I've mentioned before a long while back, but I'll reaffirm them here. For people who are already out of high school, whether they loved it or hated it, high school anime allows them to either relive their own best moments as they watch a show, or in the back of their minds, wish that their own experience with high school has been that memorable or exciting. For younger people who are still in high school, it's fun fantasize about maybe experiencing similar things during their own high school experience, be it because they are already in high school, or are heading there in the future. There's also a smaller group of people that just finished high school, who are naturally stuck, not sure of where they are going, or what's going to happen next, who are hanging on to some of their memories for comfort's sake, and high school anime helps them relive that, at least to an extent. In the back of our minds, we also know that, or are at least told that certain things are supposed to happen, like a first love or first kiss or first real dance etc. If that doesn't happen for us, we think of high school as disappointing, but anime loves to have those tropes in it, so we enjoy seeing those happen.
On another note, we are also made to believe that despite it all, high school is meant to be the best four years of our lives, which may or may not be true for some people, but for anime characters, it usually is played out that way. They go through hardships, maybe even death, but by the end of it, they end in love or learn a life lesson that they will carry for he rest of their existence, and that's appealing because it's dramatic and intense and involved. High School anime works, not because it resonates with us, because of how it plays with our emotions, expectations, and hopes, and there will always be people who are okay with that.