That's an absolutely terrible moral and pretty much the sole source of unnecessary suffering in the world.
Would it interest you to know that Terry Pratchett is a vehement atheist, doesn't believe in any Gods or holy books, thinks the universe and humanity is an extraordinary wondrous physical phenomenon, and thinks that morality arises from human reason rather than divine "laws"? He writes comedic fantasy, full of gods and non-humans and witches and wizards. They are written in a mythical method: multilayered messages that require a broad understanding to get the "inside story". Or at least, the inside jokes. Terry Pratchett on God and Religion.
I don't think that reverance or respect for the dead needs the dead to be hidden from sight completely. It is the attitude that you bring, as a witness to a dead body, that matters, not the display and witnessing of a dead body, per se.