Answer:
In the middle ages people could not read or write, so they would look at pictures instead to understand the story of the bible.
Since this was the only religeon, people had to stick with it or they would be threatened by the pope, the leader of the church, that they had to follow it.
The pictures of Hell were so frightning that the people did not dare to commit a sin.