They do it, to the extent that they do, by studiously ignoring most of it.
Seriously, have you been to India? Most of the country, by which I mean most of what would be called “flyover country” in the USA, is mired in abject poverty. People still live in mud and wattle huts, work huge agricultural fields with hand tools, collect water buffalo dung and dry it for fuel, and don’t speak to anyone outside of their villages for most of their lives.
What’s to “hold together”?
We sell steam-producing equipment to BHEL (Bharat Heavy Electricals, Ltd.) which is a quasi-government agency responsible for building electrical generating stations across India. The company is as corrupt and inept as one could imagine. But that’s balanced by the fact that there is no retail market for electricity in India. One of the iconic photos of India is a shot of a utility pole in even one of its major cities: New Delhi, Bangalore, Mumbai, Kolkata, you name it – with a rats’ nest of electrical wires surrounding the pole from top to bottom. Each pair of those wires represents a theft of electricity.
Even on the power plants we provide parts for (and licenses for BHEL to manufacture their own parts to our design) they are built by workers who often have to make their own basic tools with scrap metal. You haven’t seen craft work until you’ve seen a worker with a homemade flame-cut wrench turning a 4” nut onto a bolt.
This is how India “runs”.
Aside from that, when the government functions at all, it is as near totalitarian as I want to see. Nearly everything is “managed” by government in India.