When the Temple stood, there were specific rituals/sacrifices that one who came into contact with a dead body would go through. Since the destruction of the Temple, it is assumed that we are all ritually unclean, more or less, as no one can do the proper sacrifices anymore. As someone had said earlier, buring the dead is a mitzvot. One of the greatest ones because it is done without any possibilty that you will receive anything from the dead person for your trouble.
As an aside, the Jewish use of gavestones was originally done in order to give people a head’s up that they were entering an area where they would come in contact with dead bodies. This was especially important after recent battles.