This is a good question. Religion is a broad topic. So, I will address cannibalism from a Judeo-Christian point of view.
Jews and Christians believe that God created man in is own image. For this reason, they believe in the sanctity of life. For this reason, cannibalism, which is the eating of human flesh is something that is viewed as a sin. In a word, man must not desecrate another human.
Second, if you read the book of Leviticus, there is an important theological statement: "Life is in the blood." The point is that life belongs to God alone. This is why Jews must not eat anything that has blood in it. The book of Acts in the New Testament makes the same exact point. Hence, this point carries over to some extent to Christians.
For these two reasons, it is clear that the Judeo-Christian traditions view cannibalism as a sinful action, which is against the will of God.