This chapter is part of the law of Moses, which is part of the covenant Yahweh made with Moses. The people were not allowed to eat the unclean animals. Scholars are uncertain about the reasons for the animals to be considered to be clean or unclean. The result of these food restrictions was a nation that was different than the nations surrounding it.
These were ways the people groups living in Canaan showed that they were grieving over people who had died. Moses is telling the people of Israel not to act like them.