The U.S. Department of Homeland Security bought at least 10 large-scale vacant warehouses in seven states from sellers including Goldman Sachs and Carlyle Group — while other owners pulled out of deals after public backlash — as part of the federal government's plans to reform its national network of detention centers.