system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do onions compliment a dish so pleasantly when you cook them, yet overpower the hell out of everything when raw?

There's a lot of vegetables that taste different when cooked, but like, cooked and raw onions are absolute worlds apart. Why?
gpt
**TL;DR**: *You're cracking open cells and turning starches to sugars when you chop and cook an onion. The first makes nasty chemicals leave or get converted to other less-strong compounds, and the second balances the flavour of whatever's left to reduce its strength.*

There's different types of onions with different amount of chemicals in them that give you a 'flavour' sensation, so let's go with a standard yellow cooking onion. 

Flavour comes from three things - the taste that your tongue detects, the scent that your nose smells, and other chemicals that cause a stinging sensation that we interpret and refer to as 'heat'. (Sidebar for fun: Some of these chemicals in onions are sulfur based and react with the water in your eyes to make you cry when you cut them.)

Onions when raw, particularly strong and pungent ones, have strong crispy cell walls that contain these chemicals nicely. Pop a chunk of one in your mouth and break it down by chewing it, and instantly you get whalloped by a concentrated mix of these sorts of chemicals in direct contact with your tongue and in super-close proximity to your smell-detecting processes, and BLOOF your sinuses are suddenly clear. 

But chop and cook that onion instead, and a lot of those cell walls get broken down, allowing the really pungent stuff a way out, where they can vaporize in the pan and give you that unmistakeable onion-cooking smell. 

Cooking (or at least cooking properly) also 'caramelizes' the onion, turning its neutral-tasting starches into pleasant-tasting sugars that cause the other flavours in the dish to be balanced with a little bit of sweetness. In the same way a spoonful of sugar really gentles down the bitterness of coffee, the sugars that the cooking process manufactures will gentle down the other bitter flavours.

(edit: speling)