It probably has to do with the fact that for thousands of years, garlic has been coveted for its health properties. People in China have been using garlic for medicinal purposes for over 3,000 years. Apparently, Greek athletes used to ingest garlic before competition. Many cultures throughout the world believed and still believe in the healing powers of garlic.
But we really have the Eastern Europeans to thank for the heads up on using garlic as a means of paranormal protection. Eastern Europeans, most notably the Romanians, were of the belief that garlic offered them protection against evil spirits.
It makes sense. If garlic could ward off disease, why not evil spirits? And since garlic could ward off evil spirits, why not use it for fending off vampires and werewolves? Thus, they could kill multiple birds with one stone. Brilliant!