1.Saudi Arabia who is pathologically contemptuous to Shiite Iran has been very close to Pakistan and they have considerably helped each other’s interests during both of their histories. In fact, Pakistan has a lot of workers in Saudi Arabia (3+ million) to help work on Saudi Arabian construction projects. Iran does not see this as helpful, considering how Saudi Arabia is a hardline enemy of Iran and the Iranian peoples.
2.Not only so, but this alliance between the two countries has been controversial, something Iran would stay out of. One example of this was during the Afghan Civil War. Notice in the image below how while India and Iran supported the Northern Alliance (which intended to become a Democratic state of Afghanistan) , Saudi Arabia and Pakistan supported the Islamic Emirate (soon later to be known as the infamous Taliban terrorist group).
3.As Iran and India developed ties and strong relations, Iran made strong oil deals with India. In fact, Iran is the second-largest supplier of crude oil to India, which makes Iran quite a big deal to India’s economic interests.
4.Meanwhile, India has invested heavily in Iran’s infrastructure and Iran’s people. This includes Highways such as the Zaranj-Delaram highway. Not only that, but 8,000 Iranian students study in Indian colleges along with the fact that India provides 67 Iranian students scholarships to study in India every year. Pakistan can’t do much in terms of educational help to Iranian students, especially when Pakistanis go to Saudi Arabia and vice-versa for education.
5.India also uses Iran’s ports as a way to economically compete with Chinese-influenced Pakistan. One example is Chabahar port, which has been financed by both Iran and India as a way to ship goods between Iran and Central Asia. With India’s strong economy (compared to Pakistan, India’s economic prowess is huge ), Iran can enable itself to surge back with the Indian economy if the US-sponsored economic sanctions cripples the country again . This is something Pakistan can’t provide.