Of course I think it matters because in the long run you will get to be department chair and such base on your ability. My oldest daughter was taught math by a crappy teacher, the kid barely learned anything because this person has political science degree. She barely understand math enough to teach. For example there are many ways to solve a problem but she only knew one way. There were many complaints about her teaching ability. I went and complained to the principal but he wouldn’t switch class for my kid. So for kid #2 I decided to switch high school and she had a fantastic math teachers. The department chair went to UCSD for math, no surprise there because UCSD has a very strong math program. All students love this teacher, no wonder he is a department chair.