The soaring costs of paying workers — both self-imposed by many companies and government-mandated via minimum wage increases —make the calculus of replacing jobs with automation more attractive, said Andrew Puzder, chief executive of CKE Restaurants.

"As you make labor more expensive, you make automation a more viable alternative," Puzder told CNBC's "Squawk Box" on Friday. CKE is the company behind the Carl's Jr. and Hardee's fast-food brands.

Five or 10 years ago, ordering automated kiosks for 6,000 locations in the U.S. was too expensive compared to labor costs, he said. "[But] they're not too expensive now."

Replacing jobs with machines is "not something you like to do," but research shows many millennials want to order with technology instead of dealing with cashiers, he added. "They don't like the personal contact. They're not going to malls or restaurants anymore."