What does "the elevator doesn't go to the top floor" mean — and why is it funny?

informal, humorous

Meaning

A jokey way of saying that someone is not very intelligent or is mentally lacking.

Where it comes from

A modern American comic insult, one of a whole family of phrases that picture the mind as a building, a vehicle, or a container that is somehow incomplete.

Why it is funny

The humor is the polite, mechanical diagnosis. Rather than call someone stupid, it pictures their head as a tall building and quietly notes that the elevator stops a few floors short of the top — the penthouse is simply never reached.

Used in a sentence

"He's sweet, but the elevator doesn't quite go to the top floor."