Ignoring that its quite hard to learn from other people remotely (somewhat easier in tech because people are used to it), a lot of people frankly don't realise that they're basically running off like a headless chicken working on stuff that doesn't actually matter - programmers especially. You really do need to see the whites of some peoples eyes to get them to actually do the right thing, some people just aren't the type to instinctively know the macro picture of what they're working on.
If I were running a company and had the cash to facilitate I think I would probably go for something like a cycle of "x weeks off 1 week of intense in-office sprinting" then repeat. Going into the office for no reason is basically pointless, or at least the option on spontaneity may be worth less than the cost of going, there's an arbitrage in recognising that.