With the exception of Iran, the pro-India factions in those countries (Maldives/Bangla/Afg) are currently in power, hence the relationship. If these factions were to lose power, that relationship would hit rock bottom, as they did in the past. But that is the dynamics of international relations - nothing is permanent.
Iran is a different situation. Too long of a discussion here. Iran wants a relationship with "any" country that is willing to maintain that relationship with it. It's primary concern is avoiding the US sanctions.