Tech giants like Facebook, Google, and LinkedIn are known for their digital products. But in the past several years, these companies and others like them have started to focus on an industry beyond their core business: real estate development.

From the lure of tax credits to efforts to provide residences for employees, there are several reasons why Silicon Valley companies are looking to build housing and even entire cities.

Google recently won city approval to construct a giant campus— which will include housing, offices, shops, businesses, and a public park — in the North Bayshore area of Mountain View, California.

Advocates of the 3.6 million-square-foot development say that it will help alleviate the area’s affordable housing crisis. Around 20% of the homes will be priced at below-market rate.

Though Google threatened to block the construction of the homes unless city officials gave the company permission to build another 800,000 square feet of office space beyond its original proposal, Mountain View City Council green-lit the plan for the homes in December, The Mercury News reported.

It calls for three new residential neighborhoods — Joaquin, Shorebird, and Pear — that will span 154 acres and include homes ranging from studios to three-bedroom units.

Sidewalk Labs— the urban innovation unit of Google parent company Alphabet — will design a high-tech neighborhood on Toronto’s waterfront in a project dubbed “Sidewalk Toronto.”

Called Quayside, the neighborhood’s plan will prioritize “environmental sustainability, affordability, mobility, and economic opportunity,” according to Sidewalk Labs.

From the renderings, it looks like Sidewalk Labs wants Quayside to be a mixed-use, pedestrian-friendly neighborhood. The preliminary illustrations include bikeshares, apartment housing, bus lines, and parks. Though details of the plan are still unclear, Sidewalk Labs CEO Dan Doctoroff, a former New York City deputy mayor, has spoken about how self-driving cars, embedded sensors that track energy usage, machine learning, and high-speed internet could improve urban environments.

Sidewalk Labs has committed $50 million to the project’s first phase, and the 12-acre development is expected to cost at least $1 billion.