You’re confusing purpose with inevitability. Why do organisms reproduce? Because if they didn’t they wouldn’t be around—duh!
This is like saying that the purpose of water is to find the path of least resistance.
This is like saying that the purpose of water is to find the path of least resistance.