In some games, at the end of a level, in order to progress to the next level, the player has to accomplish a significantly more difficult challenge. This might include solving a complex puzzle, defeating a large number of "normal" opposing units, and/or one or more very powerful opposing units. These more powerful end-of-level units, sometimes actually physically larger, are called bosses. The most powerful boss is at the end of the last level of the game.
These bosses may also have significance in the story, such as being a recurring antagonist; thus their defeat moves the story along as well.
Bosses can cause significant frustration if they are too difficult, and almost a letdown if they are too easy. These bosses are primarily a game element, but they also require a player to demonstrate a certain level of competency that will be necessary for subsequent levels.
So to sum it up, final exams are horrible and tension inducing, and bosses are exciting and satisfying. Go figure.