When Yahoo CEO Marissa Mayer announced an end to the company’s work-from-home policy in early 2013, she was met with sharp criticism for taking away her employees’ flexibility.
Though she has since publicly defended her decision, Mayer reiterated that physically putting people together better fosters collaboration and creativity during Fortune‘s Global Forum conference on Tuesday.
When asked by Fortune assistant managing editor Adam Lashinsky whether it was an attempt to make a statement about management styles or work environments, Mayer explained that the policy was simply what Yahoo (YHOO) needed at the time. The policy also emerged out of feedback she had gotten from some of her employees, and Mayer felt compelled to act on it.
“Good executives confuse themselves when they convince themselves that they do things,” she recalled Google Executive Chairman Eric Schmidt once telling her about the art of leadership. Instead, Mayer believes she needs to listen to her teams and remove any obstacles as they work to achieve the company’s goals.
That policy aside, Mayer has generally brought additional perks and employee-friendly policies to the company, such as giving fitness trackers and free meals to employees, a move very clearly inspired by Google’s (GOOG) own culture, where she was an early employee and executive before joining Yahoo.
On the subject of supporting employees, Marc Benioff, who co-founded and heads business software giant Salesforce (CRM), shared that his company has spent roughly $3 million this year to adjust the salaries of its female employees to match that of their male counterparts. With the subject of gender diversity and equality being top of mind in Silicon Valley in recent times, Salesforce and Benioff made a commitment this year to make sure its female employees are paid the same as men.
Subscribe to Data Sheet, Fortune’s daily newsletter on the business of technology.
For more about Yahoo, watch this Fortune video: