First, let’s clarify the question: we’re talking about traditional corn tortillas, and by lime we’re referring to a calcium hydroxide solution, not the green fruit. Corn tortillas were historically made from what is called nixtamalized corn, which involves soaking corn in a basic solution like calcium hydroxide. The process goes back about three thousand years to the Aztec and Mayan civilizations. Because of its ancient origin, how it was discovered isn’t clear, but why it survived is now obvious. Corn lacks one of the essential vitamins required in human diets; it doesn’t have niacin, also called vitamin B3. People who don’t get enough niacin in their diet develop a disease known as pellegra (just like if you lack vitamin C, you get scurvy), which has some awful symptoms. Obviously this is a problem if your civilization’s staple food is corn. Somehow, the Aztec or Mayan people figured out that cooking corn with strong bases prevented people from getting pellegra. Now we know this is because niacin is not readily available in corn, but can be released by treatment with a strong base.