There are several reasons that decks of playing cards have jokers.
1. Jokers cost the manufacturer nothing to make.
2. People like having the jokers as an extra card in case they lose or injure one of the required playing cards.
3. Some games, starting with euchre in the 1860s, require jokers.
4. The joker reminds some people of the fool in the tarot decks. Or of their fathers. Or of themselves!
Here's more explanations of the joker in the modern decks.
1. Jokers cost the manufacturer nothing to make. Cards are printed in sheets of 7 by 8 cards so with 56 cards being printed on each sheet and only 52 required for the deck, why not print 2 or more jokers?
2. People like having the jokers as an extra card in case they lose or injure one of the required playing cards. People now expect the jokers and many people collect jokers.
3. Some games, starting with Euchre in the 1860s, require jokers. Many card games now require jokers. Many poker games, prior to the current domination of poker by Texas Holdem, could involve "jokers wild". In the first card game that I remember playing, War, the joker was the highest card beating even the ace.
4. The joker reminds some people of the fool in the tarot decks. I'm not sure why this is relevant but many people have explained the joker as a descendent of the fool. Maybe they are looking for a fool and should look in the mirror. LOL!
The following is from a Facebook discussion in the private Joker Collectors Group. The comment is by Dan Nordquist, Jan 17, 2017.
Supposedly the first "Jokers" said "Best Bower" on the card and not "Joker". The first Joker is ( according to Hochman / Dawsons ) a card with what looks like a doghouse on it. The word "Bower" can also refer ( elsewhere ) to a ship's anchor or a pleasant shady place in nature. Curiously the word "bauer" means "peasant" in German. Sometimes the Jacks were trump cards in old games, and jacks are a type of "peasant" or "lower ranking man" in a way. Back in the days before Jokers.... Hmmmm. Old games like "Euchre" could be pronounced "Joker" by some, methinks...
The following is from the same Facebook discussion in the private Joker Collectors Group. The comment is by Matt Probert, Jan 17, 2017.
The origin of the Joker is a tangled web indeed. There is no argument that in the form that we currently understand it started in an evolution of the game of Euchre as the "Best Bower" out ranking the Left Bower and Right bower. The work joker allegedly occurs in the English language in the 17th century (according to the Oxford English Dictionary), but is not mentioned by Bailey nor by Johnson in his concise edition (he may mention it in his folio edition, but I don't have one of those to check), rather the word joker appears to enter the English language in the mid or late 19th century meaning as you'd expect, someone who plays jokes or a jester - as the joker is often depicted.
The visual similarity of the joker to the Tarot or Taroc major arcana 'fool' (Le Mat) leads me to suspect an adoption into American cards from the central European packs. The early jokers were wild cards, and are also sometime known as the "wild card". I would direct readers to the IPCS article by David Parlett re-published online at http://www.parlettgames.uk/histocs/euchre.html which appears to be a well researched and balanced investigation into the origins of Euchre.