About 5 million California residents left the Golden State during the past decade, marking an “unprecedented” number according to a report released this week.

The Sacramento Bee analyzed tax return data from the Internal Revenue Service between 2004 and 2013, the height of the housing crash and recession, which impacted California more sharply than most states.

During that time period, about 3.9 million people moved to California from other states, leaving a net migration population loss of more than 1 million people.

Texas attracted more Californians than any other state, drawing 600,000 residents.

Chuck DeVore, the vice president of the Texas Public Policy Foundation and a former Republican assemblyman in California, said the pattern over the last decade has shown former Californians generally moving to states with greater economic opportunity, less regulation and lower taxes.

California has a 13.3 percent income tax, the highest in the U.S., and ranked as the fourth most taxed state in the nation, according to the Tax Foundation. In comparison, Texas, which does not have an income tax, ranked at 47.

“This is just Americans maximizing their opportunity,” DeVore said.

Most Californians are likely not moving to Texas specifically because of lower taxes and a lower regulatory burden, he said, but are rather going to where the jobs are.

Texas came in as the sixth best place to do business in the U.S. in a broader Forbes assessment that included labor costs, regulatory laws, taxes and unemployment. California ranked at 37.

DeVore said individuals may not necessarily take these factors into account when moving to a different state, but business owners are comparing tax structures and regulatory climates when deciding to relocate.

“This is why we have 50 laboratories of democracy,” he said. “Those states that have more freedom attract more jobs and more workers. Those states with less freedom will generally see a lower rate of economic growth.”

Beyond seeking greater job opportunities, DeVore said people are likely leaving California because of its high cost of living, which currently ranks as the nation’s third highest behind Hawaii and Washington, D.C.

The average rent in California’s most expensive city, San Francisco, is $3,458 versus the average rent in Texas’ most expensive city, Austin, which is $1,185.

California’s high cost of living is driven primarily by high housing prices, which DeVore said are inflated by government regulations that make it difficult to build in the state and in turn leaves the market unable to meet demand.

He said this artificially drives up the cost of rent and mortgage, “materially damaging” people’s standard of living.

“When you have a very high percentage of your income going to shelter, as is the case with many Californians, it leaves less money for other necessities like food, clothing and transportation,” DeVore said. “This puts a lot of pressure on both business owners and workers to move out of the state.”

Unless this changes, he said, California will continue to see large numbers of domestic outmigration.