During fertilisation only one sperm can fertilise the ovum. So why so many millions of sperms are produced?? Isn't this a waste of energy?
Short answer : Sexual selection with sperm competition
However this answer will vary depending on which species you are referring to. When female mates with multiple males (like in many insects), sperm competition increases male's chances of getting his genes forwarded to next generation. When there is not much rival competition with other males (like in humans) this has correlation with mate guarding behavior and quality of sperm.