Both sides argument here, but essentially Iran's mullahs would like to take over the holy site, and when they refuse to sign a paper saying they won't do demonstrations etc. the Saudis say: no paper no visit.
there are real security worries, that a demonstration might lead to more deaths if pilgrims panic and try to get away, as has happened in the past.
And background: Iranians once "demonstrated" to try to take the place over, an episode that didn't end well for them. Wikipedia article gives a long history of the feud and points out that the "demonstration" (AKA riot) resulted in panic, a stampede, and quite a few deaths.
the real feud in the Middle East is the Sunni/Shiite divide: Israel is just a side show to deflect hatred, but even if you got rid of Israel, the place would still be a mess.
The rioting, and the resulting stampede caused a reported 402 dead (275 Iranians, 85 Saudis including policemen, and 42 pilgrims from other countries) and 649 wounded (303 Iranians, 145 Saudis and 201 other nationals).
Of course, the Arab/Persian feuding goes back way before Islam, but that's another story.