Where does rational thought come from? Somewhere between ape and man, child and adult, our thinking went from wholly irrational to mostly rationality. We don't see any other animals exhibit the same ability to grasp the world around them like humans. Perhaps glimpses, but nothing quite to our scale.
Rational thought had to have been developed. If anything like language, this was not a biological event, but a cultural one. Having had two children, I am a first hand witness to the slow growth out of instinctual infancy to the budding rationality of childhood. Rationality has to be learned.
Rationality is a tool to understand the outside world, which ultimately leads to our desire to satisfy our wants. Our emotions create these desires, and it is our rationality that allows us to satiate those desires. That is to say, our emotions tell us that we want the apple, but our rationality tells us how to get it. At the core, our emotions are driving everything we do.