I can understand what you say, but honestly, how many times India has sold a weapon, trained intelligence/ insurgents that came to harm the USA? Actually for decades, Indians have been fighting Muslim insurgents from Pakistan, while US govts were SUPPORTING Pakistan, ISI and the muslim insurgents in there. All in the name of cold war. Do you know why India landed in the USSR camp? Maybe I can give you a small dose of history ...
Once upon a time long long ago, (1960s) India was firmly in the non-aligned camp. Dealing neither with the USA nor with the USSR overtly. Actually back then, covertly CIA used to train the Indian intelligence agencies (the fledgling RAW). The US used to believe India was the best bet against communism in Asia!
http://www-english.tamu.edu/pers/fac/bhattacharya/files/Madan_Between Defense and Development.pdf
However, in the mid 1960s, USA got close with Pakistan and started developing ties with China through Pakistan.
Pakistan also got US weapons (F-86 sabres with AIM-9 sidewinder, Patton tank) through Saudi Arabia and Iran, courtesy of the CIA - primarily to counter soviet influence in South Asia. However, guess where those weapons were used? Against India in the 1965 war and again against India in 1971 war. In the 1971 war, Kissinger and Nixon also wagered that China can invade India in support of Pakistan. They also sent a carrier battle group to Bay of Bengal to threaten India during 1971.
Nixon/Kissinger Saw India as "Soviet Stooge" in 1971 South Asia Crisis
Result? India signed a defense pact with the USSR in 1972, and started developing their own nuclear program. Counterproductive at best!
Now, back to India "lecturing" the USA - there is no lecturing involved - it is simply a choice - either you help us or you help our enemies. USA cannot hope to sell India weapons at a market rate and then give "military aid" to Pakistan, i.e. free weapons to maintain "balance of power". Screw balance of power. Indians feel like their hard earned money is going in purchasing weapons from USA, which is helping in arming their enemies across the border.
Has the US felt that for the last 25 years about India? Or even before that?
And yes - I agree completely that India and USA should be allies - the alliance can be as close and as good as the USA-Israel alliance. But just like Israel would not tolerate USA friendship with Syria, Lebanon or Iran, India cannot tolerate USA friendship with Pakistan.
I think it is time USA and India make a defence pact and have real close diplomatic ties.