Origin story

From shah mat, commonly explained as the king is helpless or defeated, passing through chess vocabulary.

Why it sticks

A board-game ending became a general word for being trapped.