The myth of Arachne shows us the religious purpose of mythology.
Arachne was a mortal who dared to defy the gods by claiming her weaving was better than that of Athens. As punishment for her hubris, she was turned into a spider to forever weave her intricate designs. Because Arachne didn't respect the gods, she was punished.