Your meanest friend may be the one who loves you the most. 

Studies show people who make others experience negative emotions believe the impact of those emotions will benefit them in the long run. When it comes to close friends, those who are harsh and honest probably just want what’s best for you. 

(Source, Source 2)