You're also aside the fact that rice and beans takes a good amount of time to prepare, which is a problem if you're working 16 hours a day - making rice takes 30 minutes and that is coming out of your sleep.
But most importantly, only having $4 at a time is how a lot of poor people have to shop. They have $4 today. Maybe they have $4 every work day as a day laborer. But they don't necessarily have $100 at the start of the week to plan everything out.