Having worked mostly remotely for a company that was going slowly down the drain, I can say that I was more productive.. But I was the first to jump ship when their buyout looked unfavorable to engineering.
Companies in yahoo's state don't necessarily care about current output (what good is more of what isn't working?)
A report I reviewed in the past indicated remote workers are more likely to walk away when a bad changes are occurring. For yahoo, that means now and/or soon.
So the aim of this was to shake loose the less loyal employees and/or to encourage 'fence-sitters' to be in an environment where they would be less likely to leave as the company circles the drain?
I don't now that doesn't seem like the purpose behind this.
With that statement, you're really highlighting the trust your company has with you. Unfortunately, it seems Yahoo is communicating that it no longer trusts any of its employees working from home. And there may be valid reasons, such as significant lost of productivity, but punishing the "good" employees with the "bad" sends a negative signal.