you’re not accounting for availability of convenient calories. it’s cheaper to stop at Burger King than to buy beans and spend my time soaking and cooking. the availability of similarly priced convenient calories simply isn’t there if you insist on avoiding animal products.
further, even when people are preparing their own food, if they raise their own, or hunt, fish or trap it, or if it’s subsidized or free, then throwing away those foods to buy beans is more expensive than eating what they have.