> Do you ever feel like you’re forced to teach topics you know won’t benefit students?
Normally, professors teach things they have some expertise in, and they're biased to think that this is useful to students.
Besides, it's often very debatable whether something is useful or not. For instance, I used to teach things such as theory of computation, automata theory, and similar so-called theoretical classes. You could debate ad nauseam whether this benefits students or not. Some would argue it's useless and students should do more javascript labs, other think that these are the foundations of our field, unlike the latest JS framework which will be obsolete in 2 years.
Some of my colleagues go to great length to convince students that the class they teach is useful, but I'm not convinced this is necessary. I've noticed that students are happy as long as they think they learn something from the class, and that the class is neither too hard or too easy. They don't question the utility of the class if the teacher manages to make the topic fun. For instance, labs, exercices, exams, should be of gradual difficulty, so each student feels they can make progress. This is challenging to achieve when the class audience is heterogenous.
So rather then the choice of topic, what had happened to me was that I disagreed with the way the topic was taught. In my university, sometimes we would work in team with little saying on the class syllabus, labs, exams... This can be frustrating and I'd just leave the team.