Emotions are orthogonal to rationality, that's why you can devise rational plans to minimize or maximize your likelihood of feeling an emotion. In other words it's perfectly rational to act in such a way to prevent sadness or pain, if that's the value you want to optimize for.
You can imagine a creature (natural or artificial it doesn't matter) that feels emotions and nevertheless it doesn't start acting irrationally just whenever the emotion is strong enough.
I could argue that human beings are in many cases such creatures; even apparently irrational behaviour caused by emotional response usually is not a bad strategy in the original environment where that instinctive reaction was selected for.
I'm not sure it would be a good idea to create AI that simulate humans in all aspects, including unpredictability, just for the sake of it. But I understand some might be tempted to explore that area in order to research creativity, assuming it had something to do with unpredictability.
Perhaps we are just fooling ourselves into thinking that our very failures are what enables us to be so $special (put whatever aspect you prefer in $special). Unfortunately we don't have much means to compare us with something else.