I just learned that garlic supposedly sprang up from the first hoofprint Satan's left hoof left when leaving paradise (while onions came from the first right hoofprint). I'm inclined to hail the old man for that but then a lot of people claim that the snake was Satan and the snake lost its legs due to fruit shenanigans so that would leave it somewhat difficult to leave footprints. It's a conundrum!
Vernacular religion is fascinating. I have a soft spot for myths of origins; every single known culture has the tendency to come up with stories about how everyday things came to be. The theologian in me is especially fascinated about all the folksy beliefs surrounding Satan and devils/demons, because they have absolutely nothing to do with the biblical canon, and yet for most people they were much closer to heart than the "high religion". I think it's because people's brains are wired to look for threats and adversaries, and it's some form of consolation when a batch of butter goes bad to blame Satan for it

(And of course, in times when illness and death was everywhere, it must have been a psychological coping mechanism as well.)
It's interesting though - why would people associate Satan with something so beneficial as onions and garlic? Must have been the sulphuric taste/smell? After all, onions were a staple in Europe, and garlic was used widely for it's antibiotic and antifungal properties... Then again, most folksy "magic" wasn't trying to draw power from God, but from the devil, and it was really common for people to dabble in magic. And at least in Finland in pre-Christian times (and existing alongside Christianity), it was widely believed that all power comes from the netherworld where the dead reside, and sky and nature deities are either adversarial towards humans or just indifferent and impossible to reach. It has been documented that as late as between the World Wars, Finnish country bumpkins would make effigies in trees to kill their neighbors or other enemies in secret, while attending Mass on Sundays because it was considered the norm. I've seen a picture of one, it was creepy as fuck; the outlines of a man drawn into the bark of a large pine. I could segue into the tradition of tree worship and how the forest was seen as an abode for powerful and dangerous magic in Finnish folklore, but my brain is too fried from exercise. Hold the thought though, because I love the topic.
I will say this much when it comes to fruit shenanigans: no one knows for sure what or who the snake in Genesis was supposed to be, but I have heard the explanation that it was a remnant of polytheist proto-Judaism and had originally been Lilith, Adam's first spouse, who later fell out of popularity and was retconned into a baddie. Satan rarely makes an appearance in the Bible, but the book of Job (my fave) has him/them as a character who is analogical to how a court person or a lawyer would act, egging God on to make Job's life a living hell in order to prove that humans are not able to face hardships with grace. But he is still clearly on God's side and only really an adversary to Job, and even that indirectly. Job is just a pawn in the game of more powerful beings! And what comes to the idea of Satan having hooves, that's a way to distinct Christianity from Greco-Roman polytheism, especially Pan - a hooved, horned, horny nature god, who was very antithetical to early Christian sensibilities. Because Pan was a very popular image in temples, it was easy to make people shun those old places of worship by association his image with evil.
An interesting snippet of info: proto-Judaism was polytheistic but monolatric (it's only OK to worship one god but others were thought to exist), and God even had a pantheon - a wife included. It is thought that the dogma of the Trinity was considered so central in early Christianity because it was the only sensible way to explain away how people were supposed to be happy with just one God instead of a celestial family unit. The Holy Spirit is often referred to in the Hebrew Bible in feminine pronouns and associations; even in translations you can find things like referring to the Spirit as a mother hen protecting believers with her wings.