sometimes a person seemingly doing unrelated things is still 'working'. i know at least for myself, i run through various scenarios of the outcome rather than staring at the code before i make my decision to implement.
edit: and i'll typically run through those scenarios while doing seemingly unrelated stuff, like shitposting on reddit or sitting in a blacked out room.