Onions, leeks and garlic are all mentioned only once in the Bible - in Numbers 11:4-6.
They are from the same genus (family) and were grown in Egypt over 4000 years ago.
For the slaves and workers who built the pyramids, onions, leeks and garlic were everyday food. They were not grown in Canaan or Israel.
God appeared in a Burning Bush and commanded Moses to go to Egypt to free the Hebrew slaves and bring them to the promised land in Canaan. Moses went, and with the slaves, left Mount Sinai and started their journey to the Promised Land in Canaan.
After travelling for about three days, the Israelites started complaining.
The rabble who were among them had greedy desires; and also the sons of Israel wept again and said, "Who will give us meat to eat? We remember the fish which we used to eat free in Egypt, the cucumbers and the melons and the leeks and the onions and the garlic, but now our appetite is gone. There is nothing at all to look at except this manna.”
One of the main complaints was that whilst in Egypt they ate cucumbers, melons, leeks, onions, and garlic. Whilst wandering in the desert, they only had the manna that God had provided.
Moses didn’t know what to do, nor could he imagine what God would do. Bread (manna) came from nowhere overnight, every night.
The people were complaining of their current situation and dwelling on their past. They were wallowing in self-pity. Even Moses seemed to get caught up in self-pity, asking God what he ever did to deserve these people, and wondering how he would be able to carry this burden. But God answered Moses by sharing out his burden with the elders of the Israelites.
The message to the Israelites was quite straightforward : The Lord responds when we ask.