Matthew 5:43"You have heard that it was said, 'Love your neighbor[a] and hate your enemy.' 44But I tell you: Love your enemies[b] and pray for those who persecute you,
The rest of that verse is "that you mat be sons of your Father in heaven".
In other words, do good so that others may glorify your Father in heaven.
It, again, has to do with showing that our Father is loving and caring.