On Friday, Yahoo human resources boss Jackie Reses sent out a memo telling all remote employees that, by June, they needed to be working in Yahoo offices.

Anybody who couldn't, or wouldn't, should quit.

Reeses wrote: "Being a Yahoo isn’t just about your day-to-day job, it is about the interactions and experiences that are only possible in our offices."

Naturally, many of these remote employees are pretty sawed-off about the decision.

So, why did Yahoo CEO Marissa Mayer make it?

We spoke with a source familiar with Mayer's thought process on the matter. Here is what that person told us:

Yahoo has a huge number of people of who work remotely – people who just never come in.

Many of these people "weren't productive," says this source.

"A lot of people hid. There were all these employees [working remotely] and nobody knew they were still at Yahoo."

These people aren't just Yahoo customer support reps. They're in all divisions, from marketing to engineering.

Mayer is happy to give Yahoo employees standard Silicon Valley benefits like free food and free smartphones. But our source says the kinds of work-from-home arrangements popular at Yahoo were not common to other Valley companies like Google or Facebook . "This is a collaborative businesses."

Mayer saw another side-benefit to making this move. She knows that some remote workers won't want to start coming into the office and so they will quit. That helps Yahoo, which needs to cut costs. It's a layoff that's not a layoff.

Bigger picture: This is about Mayer "carefully getting to problems created by Yahoo's huge, bloated infrastructure." The company got fat and lazy over the past 15 years, and this is Mayer getting it into fighting shape.

This source gives Mayer credit for making a very tough decision – one that her predecessors knew they had to make, but never did.

"She's turned out to have a lot of courage. She's dealing with problems no one wanted to deal with before."

We'd like to hear from more Yahoo sources. Reach nicholas@businessinsider.com.