depression as evolved to help us adapt and survive. If we lose at something depression is our natural reaction which helps us come to terms with the fact that we lost and its consequences. It inspires us to stop competing with others and achieving a higher status then we currently have. The function is to prevent the loser from suffering defeat. Therefore they reduce efforts and ambitions which leads to depression.
Lower rank
Prevents the person who has won from inflicting further injury on the loser
Ensures the loser will not try again to gain a higher rank in society