I think the origins of this are largely cultural.
Here in Britain we have always had a degree of Bureaucracy at various levels in society, combined with a wealth of regulations and an aptitude for petty officiousness that can make dealings with any large organisation ( not only government or local government- power companies, telephone companies, everyone ) deeply frustrating.
We mitigate this somewhat by also being sarcastic and quick to laugh about the ridiculous predicaments that we find ourselves in, even as we are deeply irritated by them.
I think it is this combination that lead to British writers bringing us the Vogons and Pratchett's Auditors ( among many other elements of life in Ankh Morpork ) while continental writers such as Kafka take a more serious approach to the same concept. Although we are subject to so much ridiculousness here, we laugh at it a little more.
There have been more serious takes on this concept of course and it is important to be conscious of the significance of
1984 as a literary landmark- books written since then are likely to reference it in some way and I would say that
Brazil is basically an extended gyre on those same Orwellian ideas.
Another strand to British culture that is often missed by other people is the class system. This may seem ridiculously antiquated, because it is, but it does still exist to some degree. In that context, the bureaucrat is in a position of power - because they represent the rules - which means that they are able to put themselves in the way of both peasants and kings. The bureaucratic jobs are typically middle-class or lower-middle-class so it is a way in which a bureaucrat can get one over their social "superiors" with impunity. In the face of annoying bureaucracy all are equally irritated but we just tut to ourselves while politely queueing- we're not animals after all.