Failure teaches us these core things:
1. Importance of what you have, sometimes when we fail it shows us what we have is sufficient, and maybe we should be content with it.
2. Where are you against your peers, someone who has succeeded while you fail means you need to work harder, improve yourself and try again.