Pasta, rice, beans, and potatoes are good for calories but time consuming to prepare. They're also difficult to prepare if you've got a shitty stove, a lot of cheap apartments have ridiculously terrible electric stoves. The above food are also bland without some seasoning which is another thing to buy. A microwave a one or two good microwave safe containers is usually much cheaper, faster, and more consistent.
If you're on $5 a day to eat you'll get more variety and options just getting canned food. While dollar stores lack fresh produce they usually have a fair amount of canned produce. While obviously not as good it's better than pasta and rice every day.
Philosophically, man, humans weren't meant to have fresh produce of all kinds from all over the world year-round. That a lot of us do can be a nice luxury for some, but I think it'd be really hard to justify such a state as a necessary component of a healthy diet.
I agree with you that budgeting sucks and is harder the less you have, though.
Buying a whole chicken is far less expensive that buying cuts and is a cheap source of meat. You can make good stock from the bones. Vegetables at the end of their shelf life are often substantially marked down and you can often freeze what you cook with them (sauce and curry for exemple). Rice is very cheap, polenta too. Fresh pasta are easy to make and delicious as are homemade tortillas. Eggs are only 16c a piece. Fresh garlic and ginger are not too expensive and with a small selection of spices and soy sauce they will go a long way in making things better. Then, you can somewhat easily grow basil, parsley, thymes and cilantro on a window sill.
Olive oil and butter were the only expensive product I used to buy but a little goes a long way.
What? One person can easily get by on $40/week for food.
I'm not saying it is impossible, far from it, but you do have to be conscious of every single purchase. That head of broccoli is $2 this week? Maybe not in the budget. Apples are up to $1/each again, those are right out. These aren't crazy organic prices either, this is regular produce and store brands. This goes double if you're trying to eat a healthy balanced diet and not going for a college kid ramen diet.
Even worse with a budget so small it is hard to take advantage of buying in bulk to save money. Buy a 50lb sack of potatoes and you can't afford to each much of anything else for the week. Buying flour to make bread is a great cost saver when you are buying in 40lb bags, but not so great in the 5lb bags with the markup.