giraiya is in top 5 strongest ninja
as sais by itachi and kisame he would kill them both even if at best chance they would still die along with him and no matter how many other ninja who came to help them the results would still be the same
kisame also said in the manga that giraiya could probably match up to the first hokage and seven sword shinobi probably him meaning kisame.
pain also said that giraiya could of defeated him on top of that he could of escaped pain and survived
if you look at the way pain destroyed konoha and he said that giraiya could of beat him
pain would have never attacked the village the way he did if giraiy was the fifth on top of that the village has somany joning and anbu also dont forget about kakashi
i think the makers of naruto made giraiya die against pain because because honestly from the facts having naruto and girayai together in battle equals you lose obviously
even though that im for giraya i know of itachis strenght
but i also believe if itachi didnt have amaterasu he would be shit tsukuyomi wont affect giraya itachi knos thats orochimaru called itachis sussanoo weak level of jutsu when sasuke fought itachi and orochimaru took over him he refeered to sussanoo as weak