Tombs of Messengers
Tombs of Messengers
I think you already know the answer to your question. "To keep the people from worshipping the graves."
Note: The burial sites of Prophet Abraham, Sara and Isaac are located within the "Tombs of the Patriarchs" in Israel.
Tombs of Messengers
Small populations with followers who knew the importance of the Message rather than the Messenger would have buried them like all normal human beings and not being concerned about it.
It is only the religious grave worshippers that want shrines to 'heroes' who then exploit the dead person when he would not have approved of it.
I repeat, humans want to know more about the personalities rather than the Messages they brought, which is why we have hadith and sunnah instead of just the Qur'an.