In nearly every non-chess field of competition I can think of, it is generally considered poor sportsmanship to quit before the game or match is played to completion. When playing other board games* (Monopoly or draughts/checkers, for example) participants are expected to continue until one player has won. In athletic competitions**, it is also considered poor behavior to leave the field of play before the game is complete, regardless of the score. This is the case even if a competitor or team is trailing by a huge difference in score, there is only a little time left, and the risk of injury when continuing to play might be fairly high. Suffering through a complete game/match, even when it is lost beyond hope, seems to be an accepted part of entering into the competition.
On the other hand, chess not only allows a player to resign when they believe they are losing, but it can be considered poor sportsmanship if a player continues to play in such a situation. If you blunder and drop a queen or rook early in the game, you're insulting your opponent if you don't resign. Down a passed pawn in an endgame and your king is not "in the box"? Time to resign or face people saying you were disrespectful toward your opponent .
Thus the question: Why is it considered good sportsmanship in chess to quit before a game is fully played out?
* There are a few board game exceptions, such as Risk, where it can become obvious who is going to win. but playing the game to completion might still take hours. Even in such situations, all remaining players usually need to agree to end the game.
** In some youth sports there are rules that cause a game to be terminated early when one team has a very large lead in the score. Still, a certain minimum amount of the game must be played.