That's the last book I'd buy from that author. If you want to write about politics, write about politics. Don't try to sneak your political views into a technical book.
What is this? "Write about what you want, but only if I also want it!" He wants to write a technical book with political examples, and did. How do you justify the requirement that books must into clean archetypical categories against the "do what you want" argument you just made?
I'm not sure why you think that's a prohibition on political content in examples. Lots of technical books have diatribes concerning many things irrelevant to the subject matter.
I read a programming book that dared to have jokes in it once. Gasp! One even talked about DNA and the wagging of dogs' tails. I suppose we've got to be extra puritanical and dogmatic once our delicate political sensitivities become more important than learning something. That way lies progress.
Jokes are what is called comic relief - a psychologic tool to ease the acceptance of the content. I find it hard to imagine a political topic fitting the same function.
But who am I to judge the author o his choices of examples. The only way is through not buying the book and maybe giving advice not to buy it either.