As someone tracking their daily nutrition for 10 years (yikes!), I can confidently say that I've never eaten worse than when I have to be at the office. It's just much more exhausting, I don't know. Ego depletion has been disproven but it seemed to me like being in the city centre, commuting, lots more social interaction, noise, anything, was making me eat crap the whole day. WFH days are usually much more wholesome/healthy.
It's not like cooking at home isn't going to yield quite some resistance. A salad is equally as easy to go buy.
I think at the office my escapist tendencies just kick in: anything for a reprieve of the more stressful environment I was in.
When I work with nice colleagues and stress levels are okay, we would usually go out for lunch and I'd eat much better. I think it's a combination of stress and commuting downtown that made go for worse options. Dunno…