Civil services, even state civil services were designed from the perspective that they would defacto govern the country. Which is actually a fact. No politician can hold a candle to civil services cadre in a country like India. Even before India got independence, the fact that most of India was unlettered and even with a democracy cannot make informed decisions was fairly obvious.
This is apart from the fact that most elected representatives themselves cannot read/write, and even if they can they have little idea about how to run things. Even the good ones take a while to get a hang of things, and are not really trained to make policy decisions. Given most elected representatives are also more like 1 - 2 term politicians, they also can't think long term or anything beyond roads and drinking water.
When you have a set up like this you need a dedicated cadre of life long administrators who can defacto govern the country. For all practical purposes civil services are ruling elite of India. They are also treated as such. The only real problem is the process of selection is made to select trivia scholars and people with a knack for theatricality than real competence. There is also an assumption that people who make it after such a process will be competent life long. Both the process and assumptions are wrong.
The sheer small size(4500 people) of civil services cadres, far reaching powers, lack of accountability, assumption of static/growing competence, there is no concept of continuous learning or training. This creates a problem of scarcity. By that comes privilege, corruption, autocratic behaviour etc. Eventually these are like mini rulers of India.
This is a big reason why even in corporate sectors everybody wants to be managers, there is an assumption that these management/administration jobs have no work, and unlimited power and perks.
India's culture makes it look like a failure to work regular engineering jobs where you build things, take a salary and go home.