Either Iran was also involved with India in spying and Jadhav was working for both or he was a Indian spy who duped Iranian authorities by pretending to be a businessman. I don't think Iran has anything to gain, indeed it has everything to lose by joining in with India in spying on Pakistan. Therefore we can conclude Jadhav was abusing his Iranian "hospitality".
I think he got caught and Pakistan shared proof with Iran. We recently had PM and Bajwa visit Iran. The Iranians must have concluded that their hospitality was abused. I am hoping that COAS Bajwa will have told the Iranians to be proactive in preventing this after having presented proof of what Jadhav was doing. I think Iran was convinced of Pakistan's argument and you see the Iranian minister in effect confirm that "Jadhav was spying for India" but that they had him under the wrong impression "as a businessman".