Evolution is a major theme of psychology. It favors adaptations that promote reproduction and continuance of the species. In order to understand why humans behave the way they do, it is important to understand the origins of these behaviors. This can be done by looking at genetic markers, examining human behavior within different historical and cultural contexts, and looking at behavior in other animals. In particular, primatologists study the behavior of other primates in order to understand how certain traits developed to aid humans in survival.
Below is a clip from Stanley Kubrick's groundbreaking film, 2001: A Space Odyssey (1968). In this scene, the man-apes learn to use their first tool. Although the clip depicts evolution as a rapid and intentional process, as opposed to the slow, random process that it actually is, it manages to convey the importance of adaptation in the evolution of behavior, and how the use of tools/technology has also evolved over time. (Skip to time stamp: 5:40).
It is important to note the relationship between behavior and the brain, in the context of evolution. All changes in brain structure translate to changes in behavior. Thus, the brain has evolved in accordance with preferable behaviors. The brain feature that sets humans apart from all other animals is another form of evolution. The pre-frontal cortex of humans is large in comparison to the rest of the brain. As a result, humans have greater cognitive and reasoning abilities. This allows them to learn more information over time, including socially enforced behaviors. Humans are able to adapt so much that we undergo constant "cultural evolution," with very little change to the human genome. Over the past few thousands of years, humans have not changed genetically but have completely transformed culturally.