It doesn't. My point is that finding people, healthy food, safe places and so on pleasant and beautiful benefits us. We use things like symmetry and color to decide if those things are beautiful. Flowers, rainbows etc just happen to have symmetry, color, simplicity, etc too so they get considered beautiful, almost by accident if you know what I mean. I believe in biology that concept is called a spandrel after the architectural term https://en.wikipedia.org/wiki/Spandrel_(biology)