I agree with other posters here that pay can vary a great deal by region, district, and education level, so making broad declarations about national averages or medians isn't very helpful. I also agree that, when talking to other teachers, pay is rarely one of their first of biggest complaints.
Many people seem to think that all one has to do to be a teacher is be able to explain pre-algebra or five-paragraph essay structure. However, content knowledge is a shockingly small part of a (decent) teacher's skillset. Do you realize that many, many high-schoolers struggle to write even one complete sentence with minimal errors? Are you aware that many, many high-schoolers don't know their multiplication tables? Many people who went to mediocre to great high schools, or who live in districts with mediocre to great schools now truly aren't aware of that reality. However, it's extremely common, especially in schools where most students are low income. (Note: There are many reasons why students are promoted and graduate with so little academic skills and knowledge, including but not limited to: poverty, abuse, neglect, illness, toxic stress, ever-changing education laws, ever-changing curriculum mandates, and administrative policies. Few of these things are even tangentially within teachers' control.) Being able to explain 7th grade pre-algebra isn't challenging, but getting a 7th-grader to perform pre-algebra on their own when they aren't proficient in 3rd grade math skills is.
Of course, when students are unable to do what's being asked of them in class, they often respond with disengagement, frustration, anger, and other modes of acting-out. They know on some level that they're supposed to be able to do this stuff, so they feel embarrassed and bad about themselves. Remedial topics are also less engaging than grade-level topics, so they're more likely to give up out of boredom. All that frustration and boredom is then taken out on the teacher or other students. Now multiply that by thirty students in one classroom.
Of course, a good teacher will try all sorts of ways to be creative, flexible, and innovative with lessons and content delivery. They will put time and energy toward building trusting, caring relationships with students and parents. They will bend over backwards to be encouraging and positive, while trying to make all students feel safe and respected in the classroom. But all of that still takes time and energy, and it's not included in the primary tasks of getting kids to solve math equations or write essays, which too many people think are the only or primary responsibilities on a teacher's plate.
In short, the job isn't just being capable of explaining pre-algebra. It's getting a twelve year old to do pre-algebra when they don't know their multiplication tables, and have resorted to calling you a f**got or a b**ch to hide their frustration. The job isn't just explaining what a thesis statement is. It's getting thirty sixteen-year-olds to write multiple paragraphs, when they struggle to write two sentences, 80% of them are currently looking at phones under their desks, and two of them are throwing markers you paid for yourself across the room. A skilled, caring teacher can work with these situations, but it's not easy. If you don't think you'd operate well in that sort of work environment, you should probably take a pause and do some additional listening before expounding upon how easy teachers have it.