The same story is playing out, over and over: People are flocking to the Bay Area for high-skilled, highly paid jobs, while cashiers, teachers and construction workers are, increasingly, saying goodbye to a place they no longer can afford.

A new study released Thursday points to why the California housing crisis is so acute, particularly in the Bay Area — where a home destroyed by fire sold for more than $900,000 and it would take four minimum wage jobs to afford an apartment: More people are moving in from other states than moving out. No other region in California has experienced such explosive growth of high-paying jobs. Statewide, between 2011 and 2016, California added just 171 homes for every 1,000 people.

SJM-L-MIGRATION-0503-90

“The boom is so ferocious that it exaggerates the driving up of the rents and the cost of living,” said Richard Walker, a geography professor emeritus at UC Berkeley and author of a new book, “Pictures of a Gone City: Tech and the Dark Side of Prosperity in the San Francisco Bay Area.”

The new research by Beacon Economics weaves together housing, economic and migration data, highlighting the underproduction of homes and cost pressures facing low- and middle-income workers amid the housing crisis. It examines the dilemma of the nation’s biggest economic engine, which is providing so much opportunity for some, while shutting so many out.

The study, commissioned by the San Francisco public policy group Next 10, documented a growing economic divide. While pay for California’s low-wage earners grew by just 17 percent over the past decade, wages rose by 29 percent for middle-income workers and nearly 43 percent for high-wage earners.

The key question for California is, “How do you manage the effects of success?” said Michael Storper, an economic geographer at UCLA’s Luskin School of Public Affairs. “At the moment we are a winner economy. California is amazing in how much it attracts high-wage, high-skill industries. Who wouldn’t want to be like that?”

At the same time, he said, how do you preserve housing for the majority of residents who don’t command high salaries? Or find a way to pay them…