If you think about it, that's evolutionary theory in a nutshell. Organisms don't evolve due to any desire or goal to change; rather, random processes cause mutations, and traits that happen to result in more copies of themselves being made tend to become more common, and that's it. There is no purpose to the changes; they just are, and "better" ones happen to become more common because they duplicate more.