I live in an expensive part of NYC and have to go decently far out (by subway, I don't have a car) to find groceries that are cheaper than local fast food unless I want to eat mostly rice and beans.
Add in the costs of my time to shop, transport groceries, cook, and clean, it's significantly cheaper to eat out most of the time. Even subtracting the one task I actually enjoy (cooking), it's still not worth it most of the time.
The result is that cooking in becomes our "treat" that we do a few times a week and we end up buying the more expensive ingredients within walking distance.