“We definitely lost out on compelling talent,” says Mr. Walker, 36 years old. He decided to move his family—and his company—to the majority-Black city of Atlanta instead. In recent years, companies have moved their headquarters out of the suburbs and downtown to court younger workers. Now more companies are adding new office footprints as a way to recruit ethnically diverse talent, too. Atlanta, in particular, has drawn a number of boldfaced names, many in tech. Microsoft Corp. is investing $75 million in an Atlanta facility it says will create 1,500 jobs. Alphabet Inc.’s Google is investing more than $25 million there this year, expanding its existing three-floor office to a new location where the company will eventually occupy 19 floors.