Just because the theory of evolution by natural selection explains how we got to be the way we are, there’s no reason to imagine it can tell us how we ought to behave. There’s no particular goal-direction for the human or any species inherent in evolution. Nor is there any master plan pointing us toward perfection. Nobody is in charge and no great plan exists in a realm beyond.
Natural selection is a non-conscious, automatic mechanism that determines how likely individuals are to get their genetic material, their DNA into the next generation. That’s it. The fact that certain individuals with specific adaptations and attributes survive whilst others die off may provide the illusion of a plan, even of design but don’t be fooled.
Natural selection isn’t random because it follows some simple principles and it does so consistently. But those principles weren’t designed either. They just are.