Police are civil servants under the direction and policies of ministries within the framework of government. The government is not just the political elite, rather its the civil service as well and that is who the majority of people deal with on a daily basis. If there isn't sufficient ministerial direction or aren't adequate agency policies in place and very importantly those policies are enforced, then the lower ranks of police (and other civil servants) will largely do as they please. This is why corruption, collusion and incompetence are so very tough to remove from much of India's civil service and society.