Nobody really knows how it came to be. But there are a number of theories, most involving clocks or old French games.
First, why do we call a score of zero love? The most plausible theory is that comes from l’oeuf, the French word for the egg, because 0 resembles an egg. (Tennis wouldn’t be the only sport to do something like this.) The only point against this is that the French word boeuf turned into the English beef, so l’oeuf would be more likely to become something like leaf than love.
It’s also possible that tennis’s “love” comes from the Dutch phrase “iets voor lof doen” in which lof refers to honour or praise. This would imply that a player with a score of love is playing for honour rather than to win. There are a number of other theories, including the ideas that when players are tied at 0-0, they still have love for the game or love for each other. It also might refer to the phrase “neither for love nor money”, referencing bets placed on the game.
The term deuce makes much more sense. It almost certainly comes from the French word deux, meaning two.
15-30-40 Scoring System
Now, why does the scoring system follow its 15-30-40 pattern? It might have come from a French game called jeu de paume, meaning palm game. It was similar to tennis, using hands instead of rackets.
…back in the pre-Revolution days, the 1000-plus jeu de paume courts in France were 90 feet total, 45 per side. Upon scoring, the server got to move up 15 feet. Another score meant another 15-foot scoot forward. Since a third score would put the server right at the net, 10 feet was the last bump forward.
However, a number of poems, ballads, and records from the 15th and 16th centuries seem to show evidence that, at some point in time, it went 15-30-45. Some have speculated that 45 was changed to 40 to make it simpler and clearer to understand. Or the change could have been a mistranslation between English and French.
One of the most popular theories regarding the 15-30-40 scoring system compares the score to a clock. If you kept score on the face of a clock, you could shift the hand by 15 minutes every time someone scores. Then the set would end once you reach a full rotation. When the players reach deuce, the scorekeeper would set them both back from 45 to 40. A player with advantage reaches 50, and getting to 60 still marks a win.
There’s only one problem with the clock theory: Clocks did not have minute hands until ~1700, over two centuries after the scoring system was first referenced. Previously, they only kept track of hours.
It is also possible that the scoring had to do with sextants and geometry. If each point equals 15 degrees, winning a game totals 60 degrees (the angle of a sextant) and winning a whole set (6 games) requires completing an entire circle.