Why are so many spermatozoa produced when only one of them fertilises the ovum?
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.