Crying
In general, crying is non-verbal communication. It (and other) facial signals evolved in our species as ways which help people in social groups signal feelings. The term "a cry for help" recognises this function. "Cry for joy" expresses the fact that sometimes great delight can be the trigger for crying.