By all evidence, history shows us that Tarot originated in the mid-15th century as a card game called tarocchi. Each card in the Major Arcana represented a different rule that applied to the actual game. There's a lot of discussion about whether the Tarot also hid certain pagan ideas (unlikely, since earlier decks were very medieval Christian), or was used in teaching religious allegory to kids. But as far as history suggests, Tarot became used for divination because a lot of things are used for divination: tea leaves, entrails, playing cards (a method that pre-dates Tarot cards as a game or an oracle, I believe).
Now, this doesn't overturn Tarot's legitimacy one bit. First of all, Tarot spoke to people as a teaching tool and an oracle because it works with archetypes, very universal figures and ideas. The images were inspiring, and really that's all divination takes: taking a look at something as a lens through which you view your life and your future. You can divine using toothpicks, coins, or clouds, so long as you have a consistent meaning attached to them. The magic is in you and in the Universe. Tarot is just a very creatively inspiring tool, one that happened to link up very easily to a lot of pre-existing ideas, and became a very effective method for teaching them.
So effective, in fact, that Tarot's popularity as an oracle grew in the 1800s, when a man named Antoine Court de Gebelin was convinced that Tarot originated in Egypt and represented Egyptian mysteries. He wrote a paper alleging a lot of connections, and others picked up on it. (Scholarship was like that a lot, back then, and Egypt fever was alive and well.) And the idea that Tarot came from Egypt, and even Atlantis, survives to today.
Now, my grand revelation? Tarot started out as a card game with a series of characters that can alter the rules of what each player is allowed to do. And amazingly, we have card games like this all the time today, mainly in the form of trading cards. Pokemon has a card game similar to this, and an American version is Magic: The Gathering. And my absolute favorite weird bit of synchronicity? A card game from Japan called Yu-Gi-Oh, where the game's fictional mythos is that it was originally played in Egypt, commanding real magickal forces, and slowly evolved into a children's game years into the future.
In some ways, Tarot is a reverse-engineered Yu-Gi-Oh - a game my now-adult brother played a lot as a kid. When I informed him of this connection, he burst out laughing. And then, after a pause, he added: "History is weird."
I had to agree.