system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does the brain decide what is funny and what is not?

For some people, everything is hilarious, even things that morally or ethically shouldn't be. For others, their humor is lighter.

Is it their experiences that dictate what is funny and what is not? Are the people who enjoy darker humor different in any way than those who do not?

ALSO: What exactly is laughter, anyway?
gpt
Humor is literally a shift in the frame of reference.  You expect one thing, you get another.  (Alternately, you don't know what to expect, and what you get is still unexpected.)

Consider the knock-knock joke:

When you say "who's there?' the expectation is the name of the knocker.  Instead you get something else.

When you attempt to clarify, you are expecting an answer that will clear your confusion.  Instead, you get an answer that was unexpected, but in retrospect makes (some) sense.

You laugh.

People speculate that humor evolves from encountering the unexpected, and then signalling to others that the unexpected is not dangerous.  If Oggh heard a noise in the bush and sent Blerg to investigate, if Blerg saw that it was a tiny squirrel had scared Oggh, he would be relieved, and signal to Oggh that he had been frightened by a squirrel.  They were expecting/fearing a tiger and got a squirrel instead.  Hilarious, no?