Myth gives a community a common framework, a common view of the world. The whole community has the same understanding of why the world is the way that it is. An example in our cultural context is the myth of David and Goliath. This myth tells us how to behave in a situation where we are faced with overwhelming odds. It teaches us courage rather than running away, and suggests an approach that can be used to cope with the situation.
Myth provides the moral values of the culture.
Many of our moral values, for example, come from the Christian myths. The story of David and Goliath is one reason why we revere courage. Murder and theft are regarded as wrong, evil, as the myth of Moses teaches us. The myth of Noah and the Ark tells us of the consequences of evil and righteousness. Myth also has an esoteric function, which is almost the opposite of the exoteric function.