Most nonscientists will find this a strange question. Feelings just are. They justify themselves.
Emotions give meaning and depth to life.
They need serve no other purpose in order to exist. On the other hand, many evolutionary biologists, in contrast to animal behaviorists, acknowledge some emotions primarily for their survival function. For both animals and humans, fear motivates the avoidance of danger, love is necessary to care for young, anger prepares one to hold ground. But the fact that a behavior functions to serve survival need not mean that that is why it is done. Other scientists have attributed the same behavior to conditioning, to learned responses.