It doesn't have to be a conscious decision or purposeful design to be "there for a reason". Evolution tends toward solutions because the population that happens to be closer to a solution are more likely to survive. Nothing the op said was incompatible with evolution.