I agree completely. But in a vacuum, the developer who codes outside of work probably has more knowledge and experience than the developer who works 40h/week and goes off to other things. Even considering diminishing returns.
You almost never want that though. Every job I've ever done involved communicating with stakeholders and team mates, working out requirements, resolving disagreements, etc.