US needs a military base in Bangladesh to strategically threaten India, given that Bangladesh borders the Siliguri Corridor. With a base in this location, US could potentially cut off this crucial corridor if India makes decisions contrary to US interests.
India and US are not allied as US is with Pakistan or Saudi Arabia. During the 1971 Indo-Pak war, India and US were on opposing sides, nearly leading to a direct conflict. India cannot continue testing intercontinental nuclear missiles, buying oil and weapons from Russia and Iran, and maintaining relations with North Korea and Cuba, and still remain a US ally. For US, a country is either an obedient ally, like Pakistan, or an enemy.