You know that thing cats do when they rub up against your legs? Did they evolve to do that?
The most sensible answer is probably "who cares, it's cute", but bear with me; a closer examination of this adorable behaviour sheds light on some more serious questions.
On one level, they obviously didn't. Cats have only been domesticated since maybe 8,000 BC. For millions of years prior, they evolved to live and hunt on their own, never interacting with humans. Domestication has led to some changes in the cat's behaviour - compared to wildcats they are generally tamer around humans, unsurprisingly - but no-one bred cats to rub up against our legs.
But on another level, evolution must be responsible. Cats all around the world do it, and we don't teach them to do it, they just decide to spontaneously. Maybe we sometimes teach them that it works for getting food, thus making them do it more often, but we don't give them the idea originally. It's an "innate" behaviour.
As I see it, leg-rubbing is based on the cat's instinct for scent-marking objects by rubbing the side of their heads against them (they have glands there although we humans can't smell them). My cats love doing this to chairs, table legs, etc. This behaviour evolved as a way for wildcats to mark out territories etc. They also like to rub up against other friendly cats as a social behaviour, probably as a way of making the whole "herd" smell the same. They do it to your legs, because in their minds you're a member of their herd... or maybe just because your legs are a bit like a chair.
Either way, leg-rubbing is an evolved behaviour, but cats didn't evolve to do it; they do it because of the interaction between their natural instincts and their artificial environment. This goes for a lot of other things too. Cats didn't evolve to drink cow's milk from bowls, they evolved to drink water from puddles, but they drink milk from bowls because evolution decided to make them like (cat's) milk (much like cow's milk), and to drink from wherever they need to. They didn't evolve to play with string, they evolved to catch mice, but... and so on.
How about us? I think the same, broadly speaking, applies. Of course we are unique amongst the animals in having human intelligence, language, conceptual thinking, etc. We are not just domesticated chimps, right? But this doesn't mean we're entirely unique. We have the same drives and emotions as other animals (maybe more, but surely not less), and the same brain mechanisms underly them. This is why if you give a mouse anti-obesity drugs they lose weight, and if you give them Valium they chill out.
One way of thinking about the human situation is that we are indeed justdomesticated chimps, but with the catch that in the process of "domestication" we found ourselves transported into an entirely new environment: a more complex world. That's what having a more intelligent brain does for you, really - it expands your world. Compared to a chimp, still less a cat, we inhabit another planet entirely. But the old drives are still operating: we just have new ways of trying to satisfy them.
Here's an example. Few things are more uniquely human than modern surgery - animals can't do it (although my cat is quite good at cutting things open, his patients rarely survive), and it requires a huge amount of forward planning and accumulated knowledge. Of course we didn't evolve to perform operations.
But when a surgeon does cosmetic surgery, they're nevertheless obeying evolution. We find certain patterns of facial shape more attractive than others, e.g. we generally like symmetry, youthfulness, sexual dimorphism, and these preferences are largelyinnate. Presumably, these preferences evolved to make us want to have babies with people carrying "good genes" of the correct reproductive age. We didn't evolve to modify faces surgically, but cats didn't evolve to rub our legs. The same preferences that have guided the eye of eager singles for millennia now guide the surgeon's hand.
Does the whole of human culture consists of us trying to satisfy our primitive desires with our newly intelligent brains? I don't know. It certainly seems a big stretch to say that all art, politics and music are based on "primitive" preferences. But maybe it'll always take a big stretch to explain all that.