India WAS economically socialist for many years and still is to some degree.
I'm not totally sure I understand your question, but a Democratic India was by no means a sure thing. A unified India wasn't a sure thing either, and convincing the 600 or so rulers of the princely states to give up their thrones was no mean feat.