Agreed. I find the unhealthy choices are generally more expensive if you shop around and to a fair degree let prices dictate what you buy (don't put "apples" on your shopping list. Put "fruit"--and see what's a good deal this week.)
What I do see is the unhealthy choices are generally less work to prepare.
Ramen noodles, anyone? Cheap, easy, low on nutritional value; high on sodium content. First choice of college students and poor people because of the calories/$1 ratio.
As noted in the post quoted above, cost of food by calorie is also important: if you have only a very small amount of money to feed a family, unfortunately, it is often the case that one does go for calories in order to stave off hunger.
Less work/less time to prepare is not inconsequential, especially for people who are juggling multiple part time jobs, small children, do not have their own car but must rely on walking or using public transport to get back and forth to the store and to work, etc.
Also important is if you have a reliable stove and/or oven and sufficient pots and pans. Hard to accumulate if you dont' have money. Or if you lost them in the last move. If your housing situation is insecure, then this becomes a real issue.
Then you get into kitchen basics that an average middle class family might have on hand: flour, sugar, eggs, butter or margerine, milk, spices, onions, garlic, potatoes, canned tomatoes, tuna, peanut butter. Cooking oil, basic herbs and spices. Rice. Beans. Pasta. All of which can be used as the backbone of a pretty inexpensive meal, if you have these on hand and can keep them pretty well stocked. But that's not easy to do if you are poor. Having helped more than one young adult offspring stock his/her first kitchen, it is surprising how quickly these things add up. Having basics on hand can make it much easier to actually put together a nutritious meal with little investment of time and effort or most importantly: money. Or having family who can help stock you up in the first place. Another luxury many poor people don't have: family who can spare a little something to help get you started or to help tide you over.
Right now, in my kitchen I probably have enough food that if I had to, I could go several weeks without visiting any kind of grocery store, so long as I wasn't picky about including fresh fruits or vegetables. Those would be gone fairly quickly, even with my fully functional refrigerator--a luxury not all poor people can count on. Or even not so poor. I've been in my kids' starter apartments and I know how much time/energy they sometimes invested in keeping just the right amount of perishable food around and the right kinds because well, the fridge wasn't that great and neither was the landlord.
Now, I am very solidly middle class. I remember very well when I first left home and earned very little money how hard it was to manage to pay rent and to eat every day---and I bought no convenience foods unless you count tuna in a can (a huge luxury for me--I could afford only 1 can at $0.79/week--and no mayo). My room mates and I pooled money to buy a pound of hamburger about once a month and made meat sauce for pasta to share. If we could afford it, which was not a given. Fortunately, I had only myself to look after and I wasn't worried about feeding a young child or someone with any kind of health condition. No meals out, period. Unless you count the occasional days when I had enough money to buy a candy bar and nothing in the cupboards at home so I just had a candy bar for the day. Not healthy and not what I wanted to do but hey: some days, I didn't even have that.
Like most middle class people, I can afford to shop around for bargains and to stock up when something is on sale. I have a car and can drive from store to store, and even make a run to a warehouse store to stock up on staples now and then. If I didnt' have a car or the ability to built up a cash reserve to fund such trips, I would be SOL as the kids used to say.