system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What is happening in my brain when I get embarrassed? Does it serve an evolutionary purpose?
gpt
From a evolutionary psychology standpoint, yes, it does serve a purpose.  It was essential for survival that we "fit in" within our tribes, and when we sense that we did something that ostracized us from the rest of the tribe, our brain tells us so by making us feel embarrassed, thereby telling us to not do it again.  It's essentially a survival instinct; failing to fit in could lead to expulsion from the tribe.  Of course now, what causes us to be embarrassed is different, and a "tribe" isn't really needed as much for survival, we still desire to be accepted in a social group.  As to what is going on in your brain, it's your brain releasing the appropriate chemicals after analyzing its environment, like any other emotional response.