Emotions like guilt evolved because they deter costly behaviors. [causal]
Sentiments of vengeance, guilt, and so forth often incur substantial avoidable costs—hence, Robert Frank (1988, 54, 57) supposes, they must also confer some sort of compensating gain to have persisted socially or genetically. These sentiments will be most effective if they can be properly communicated to deter or encourage relevant actions from others. If devices for communicating, such as blushing, are genetic, we may then explain the genetic selection as the result of interests—it may even develop through intensive cultural conditioning.
XREF: Connects to Robert Frank's work on emotions as commitment devices — the idea that seemingly costly sentiments actually serve strategic social functions.
Russell Hardin, Trust and Trustworthiness, loc. 619