Having compassion makes your life better.
That's the only reason Jesus taught it.
It's self explanatory: You are nicer to other people. Other people are nicer to you. Everybody is nice to each other. We have a nice time.
Just try your best to be nice to people and develop your wisdom by taking time to think about your life.