Why were onions so expensive in 19th century Wallachia?

To add a culinary perspective here. In a modern kitchen I would definitely consider onions, or items in the onion family, such as garlic, leek, scallions, shallots essential. Could they be skipped entirely? Yes of course. However in Indian cuisine there is a saying, " A day without an onion is a day without sunshine". Onions would have been the # 1 plant substance of value on a shopping list. They also have a very long storage life allowing for travel and easily lasting over a winter unlike any green vegetable. But in the past, and now, what they supply is a "force multiplier" effect. Take barley soup; a cheap to make staple of medieval life I'm sure. Basically roasted beef or lamb bones, barley, onions, seasonings and some vegetables if available. And water. Free water. Water and onions is the key thing, because the onions add "body" to the broth, without them any broth-type recipe tastes very flat.

A little bit of onions makes a huge difference, a small amount enhances a great deal of liquid and perhaps makes the difference between a grim result and a sale-able product.

Back in those times they didn't see value in vegetables or salad type things. A once a day meal would always involve a soup or stew with anything handy thrown in, thickened with beans, like the in the old English children's rhyme, "Peas porridge pot, peas porridge cold, peas porridge in the pot three days old'. The peas would have split peas (lentils). Animal bones and onions would have been the other essential ingredients.

The price anomaly also could reflect the seasonal spike in availability. A large cooking onion is only harvested in the fall, then put in cold storage, so supplies would run low sometime in the next year before new ones came to market. We forget that our modern food supply system evens out these price spikes.
Finally onions may have been one of those things valued, like nutmeg, that was important because people believed it had disease defense properties, and so was of a value beyond its simple contribution in a recipe. Chef Jono.

/r/AskHistorians Thread