i've had a few teachers that spoke their contentious political opinions quite freely, and it sometimes made me uncomfortable, and it's certainly not professional, but it never made any of their lessons objectively worse or made them a worse teacher. it was just inappropriate, and that's it. accusing a teacher of not doing their job properly because they stepped over the line of appropriate topics once or twice is definitely not fair. most of my family consists of educators, and they would probably all agree that this teacher was being grossly unprofessional (actually i've already seen this on facebook because of that), but i don't think they would say much more than that
I guess it depends greatly on the precise actions of the teachers involved, because there are cases that are simply unprofessional as you say, but there are also cases that are simply grossly inappropriate.
In my own education I've had 3 teachers who each lectured their own political views to <16 year olds at the cost of actually teaching their subject.
I had one geography teacher (actually a PE teacher who subbed for the year) who never taught any geography and spent every class spouting anti-war rhetoric. He definitely should not have been teaching.
Then I had a history teacher who was really good, but on occasion he would stray off to attack modern day parties even as they weren't relevant to his class of 12 year olds. I don't think he should have been allowed to say those things at that time.
As for this example in the OP, it's a really silly and needless inclusion on the homework. In no way does the subject of those questions being politicians benefit the education derived of that exercise.
It's running a fine line that's not worth being on.
You can't even defend that level of politics in the classroom as being challenging to worldviews as it offers no room for personal thought and it's aimed at children too young to start comprehending politics properly.
It's at the stage of education where kids simply memorise and repeat what's on the blackboard, and that's not the time to subject them to politics.