Even if you're not aware of it, your brain is dedicating resources to the latter of these jobs. Over 9 hours, that wears you down. You may not notice it. You may attribute your end-of-day fatigue and digestive problems to aging even though you're not actually old.
There is no greater weapon for a knowledge worker than one solid hour of focused, uninterrupted work.
Most great knowledge workers are introverts. I don't mean 'introverts' in the pop culture way, I mean the scientific description - people who think deeply and internally about things and work best with focused solitude.Most people think introverts are shy, repressed loners but that's not accurate. There are athletes who do tons of interviews, very well, who are introverts.
There's a place for extroverts, but it is not in this kind of specific work. And extroverts work differently - an open office is great for them and they can't understand why anyone wouldn't want to work that way.
Whenever I see companies (usually start ups) who have their coders all working in a bullpen, I secretly think ('not hardcore coders'). Just my bias, but over a career that has now spanned nearly 20 years, I've come to trust it.