There may be more to this than meets the eye. Iran meets Pakistan in the restive place called Baluchistan. For a long time, the Baluchs have cut up rough in Iran and escaped across the border to Pakistan; and cut up rough in Pakistan and escaped across the border to Iran.
Both Iran and Pakistan would like this to stop. Right now Iran has to commit a lot of forces to Baluchistan, but if they got on good terms with Pakistan, enough to let the Pakistan army sweep all of Baluchistan, the Iranians could commit those forces elsewhere. And this would solve the Baluch problem for a while, with the Pak army butchering a lot of them.
This would be a way for Pakistan to show its support for Iran without committing any of its forces to battle, and keeping them close enough to home in case India decided to rattle their cage, which it could do easily.
The Pak government also has to be a little careful, because the army is more than ready to displace them in a coup again, and restore Perv as leader.
Other players who may want some involvement include a semi-alliance between Israel and India; with China on the side of Pakistan, up to a very shallow level.
I think you’re on to something. At leats it is geo-politically logical. That’s probably why Us, Nato and allies should consider giving the Baluch people a homeland. It will also give the allies a free access to Afghanistan and C. Asia beyond while cutting Pakistan to size.