For Ms. Evans, that meant being a janitor in Building 326 at Eastman Kodak’s campus in Rochester in the early 1980s. For Ms. Ramos, that means cleaning at Apple’s headquarters in Cupertino, Calif., in the present day.

ROCHESTER — Gail Evans and Marta Ramos have one thing in common: They have each cleaned offices for one of the most innovative, profitable and all-around successful companies in the United States.

Ms. Evans is African-American, Ms. Ramos Latino.

In the 35 years between their jobs as janitors, corporations across America have flocked to a new management theory: Focus on core competence and outsource the rest. The approach has made companies more nimble and more productive, and delivered huge profits for shareholders. It has also fueled inequality and helps explain why many working-class Americans are struggling even in an ostensibly healthy economy.

The $16.60 per hour Ms. Ramos earns as a janitor at Apple works out to about the same in inflation-adjusted terms as what Ms. Evans earned 35 years ago. But that’s where the similarities end.

Ms. Evans was a full-time employee of Kodak. She received more than four weeks of paid vacation per year, reimbursement of some tuition costs to go to college part time, and a bonus payment every March. When the facility she cleaned was shut down, the company found another job for her: cutting film.

Ms. Ramos is an employee of a contractor that Apple uses to keep its facilities clean. She hasn’t taken a vacation in years, because she can’t afford the lost wages. Going back to school is similarly out of reach. There are certainly no bonuses, nor even a remote possibility of being transferred to some other role at Apple.

Yet the biggest difference between their two experiences is in the opportunities they created. A manager learned that Ms. Evans was taking computer classes while she was working as a janitor and asked her to teach some other employees how to use spreadsheet software to track inventory. When she eventually finished her college degree in 1987, she was promoted to a professional-track job in information technology.

Less than a decade later, Ms. Evans was chief technology officer of the whole company, and she has had a long career since as a senior executive at other top companies. Ms. Ramos sees the only advancement possibility as becoming a team leader keeping tabs on a few other janitors, which pays an extra 50 cents an hour.

They both spent a lot of time cleaning floors. The difference is, for Ms. Ramos, that work is also a ceiling.