Why is stalemate a thing?


Because the goal of the game is to checkmate the opponent's king. Chess without stalemate would be less rich than now, especially some endgames. For instance some king and pawn vs king endgames are a draw because the side with a pawn has to either repeat the position, stalemate the opponent or to give up a pawn and draw because of insufficient material.
For instance king and rook's pawn is always a draw if opponent's king is close by.
If you forget about stalemate, many endgames wouldn't even have to be played. In short chess would be simplified compared to now.

It is just a rule - That being said, in some old rules of chess in the medieval time stalemate was a win. It is just part of the game.

put two kings on the board, and play until you figure out who wins. Then get back to us.
That's not what he's talking about. Stalemate isn't just insufficient material. Nimrod47 is referring to when the king has no legal moves.

Chess evolved over centuries, so it wasn't planned as the modern version.
It wasn't until modern times that anyone could do a statistical analysis to know that white has an advantage, however slight, over black. If was known for fact that white has an advantage by playing first, probably a long time ago, black would have had draw odds. But as it stands, even statistical analysis of millions of chess games is only a statistic.
Unless chess is solved by brute force, nobody will ever know precisely if chess can be always won by white, or always drawn by black.
The best we can do is give black draw odds when tiebreaking, if a tournament has the luxury of having tie break games at the end of a tournament.
As a general rule, for tiebreaking purposes, black has draw odds, but less time than white. That's the most common tiebreak system when using tiebreak games.
It is a rule. What if your king is trapped without check but its check mate. You will fell sad right. Just remove that with accurate play
I think you mean: "What if your king is trapped without check but it can't move."

This also answers another basic "complaint" that some people have about resigning: Why won't my opponent resign when all he has left is a king?
Because the opponent is hoping for a stalemate.
No, it's not bad chess etiquette to not resign in a losing position. The only stipulation in a game of chess is that one side checkmates the king, or wins because his opponent lost on time, or the game is drawn due to a variety of reasons, which Stalemate is one of those reasons.
Both players running out of time, stalemate, and insufficient material to mate, and agreeing to a draw are the most common ways to end a game in a draw.
Both players running out of time is an over-the-board thing, in which neither player realizes their flags have fallen. No idea if a player claim a checkmate win if both flags have already fallen, but I think a checkmate supersedes fallen flags. Haven't played OTB many years.