For example, it was historically non-aligned but on friendly terms with the Soviet Union:
> In 1954, the United States made Pakistan a Central Treaty Organization (CENTO) ally. As a result, India cultivated strategic and military relations with the Soviet Union to counter Pakistan–United States relations.[2] In 1961, India became a founding member of the Non-Aligned Movement to abstain from aligning with either the US or the USSR in the Cold War.
Of course, India would seem to be a natural ally given that both countries are committed democracies and there is massive immigration from India to the United States, but in practice the United States likes the reliability of less-democratic states and India likes to control its own affairs and is powerful enough to do so.
True that India isn’t strictly an ally of the west. And even now India is importing oil from Russia. Though, I’d say much of these differences with the west are not ideological as much as the result of India applying realpolitik to their geographic circumstances. And after being screwed by the British for centuries, India doesn’t feel like owes any favors to the west. If India were located in Europe, without needing to deal with Pakistan and China, I think they’d have a lot in common with other European nations. I know that’s a bold claim. At least on paper, Indias government was formed based on principle of equality and self-determination. Obviously, populism and corruption have caused the government to veer slightly off course, but India is nothing like countries like Russia or China, at least.
>If India were located in Europe, without needing to deal with Pakistan and China
Because of the Himalayas, China can't interfere with India any more than it could if India were in Europe. (Yes, I know about the recent deadly skirmishes on their shared border. They involved small numbers of soldiers and even getting large numbers of soldiers to the border would be arduous, let alone anything like a tank.)
For example, it was historically non-aligned but on friendly terms with the Soviet Union:
> In 1954, the United States made Pakistan a Central Treaty Organization (CENTO) ally. As a result, India cultivated strategic and military relations with the Soviet Union to counter Pakistan–United States relations.[2] In 1961, India became a founding member of the Non-Aligned Movement to abstain from aligning with either the US or the USSR in the Cold War.
https://en.m.wikipedia.org/wiki/India–United_States_relation...
Pakistan is/was a closer and more reliable ally for the United States.
For another example where India disregarded the interests of the west:
> In 1970, Indira Gandhi enacted legislation which barred medical products from being patented in the country.
https://en.m.wikipedia.org/wiki/Pharmaceutical_industry_in_I...
Of course, India would seem to be a natural ally given that both countries are committed democracies and there is massive immigration from India to the United States, but in practice the United States likes the reliability of less-democratic states and India likes to control its own affairs and is powerful enough to do so.
So it goes.