Think about it this way. We have System1 and System2. Emotions reside in System1. Now imagine we have build AI systems which are so fast they can compute complex heuristics of System2 at the speed of System1. Then AI's emotions will be more rational.
System 1 and system 2 are metaphors not actual systems.
Emotions do not only exist in the not actually a real thing system 1. People who take damage to the emotional centers of their brains become passive and apathetic not hyper intelligent system 2 Vulcans.
The only reason "avoid dangerous things like snakes so I continue to live" is a goal is emotions.