Boxed, the bulk grocery superstore in a mobile app, decided to commit to its employees displaced by robots after automating a fulfillment center.

Robots replaced three-quarters of the warehouse jobs at Boxed's fulfillment center in Union, N.J., the company announced Thursday. But instead of firing the employees displaced by robots, the company says it will retrain them for new jobs.

Two years ago, Chieh Huang, the CEO and co-founder of bulk grocery e-commerce startup Boxed, decided the company would automate its largest fulfillment center. The robots would increase productivity six-fold. But during a board meeting, the conversation turned to how the workforce could be slashed by 75 percent without affecting capacity.

Boxed, which was founded in 2013 in Edison, N.J., could have saved "millions" of dollars in the short term by laying off three-quarters of its 100 warehouse employees, Huang tells Inc. But, as he looked at the list of employees whose jobs would be lost to robots, he decided no one would be fired. With approximately 400 employees across four fulfillment centers (New Jersey, Nevada, Georgia, and Texas), Huang says he didn't want to set a precedent with his first automated warehouse and make all of his employees fearful for their jobs.

"I took a moral stand and made the commitment that we would not allow people to lose their job due to automation," says Huang. "These folks helped us grow the business and I couldn't say, 'Thank you for your hard work, but we'll take it from here.' "

Huang says the company, which is not yet profitable and raised $132 million in venture capital from American Express Ventures, Bessemer Venture Partners, DST Global, and others, could have maximized margins and increased savings by reducing staff, but he told the board that he felt the company would be more profitable in the long term if it dedicated itself to its employees. (The company does not share revenue or sales numbers.)

"The whole story of a company's value and profitability is not contained on a spreadsheet," says Huang. "Increased morale and a better trained workforce will do more for our company than chasing cost-savings and eliminating every borderline job."

This is not the first time Huang has decided to double down on supporting his employees. Last year, Huang announced that he would pay for his full-time employees' kids' college tuition. A few months ago, Huang announced he would pay for up to $20,000 for any full-time employee's wedding.

Huang says the main business benefit to retraining employees whose jobs were displaced by robotics is loyalty and culture. While the company would not share turnover rates in the warehouse, the company says only 10 corporate employees have quit since the company launched in 2013.

But the main inspiration, Huang says, was his own experience growing up below the poverty line. Many of his warehouse employees live a similar existence and he wanted to help.

"It sucked growing up poor," says Huang. "Now I am in a position in run my business my own way."

Boxed's automated warehouse cost millions of dollars. A three-story, modular compartment system outfitted with robotic pickers has replaced humans running from shelf to shelf. The employees now tell the robots which products need to be fetched and the "iBots" pick and deliver the products.

The employees then place the products in the box and send it down the conveyor belt where another robot seals the box. The next robot slaps on the shipping label and an automated funnel system sorts boxes by weight, ZIP code, and dimension for delivery. The whole system runs on software developed in house.

Huang says the employees who have been replaced are being retrained to manage the bots. Any employee who wants a different position can be trained for customer service or software testing. Huang says Boxed plans to work with a local college to offer business courses to employees who want to explore a different career path.

According to a PwC report, about 38 percent of U.S. jobs could be replaced by artificial intelligence within 15 years. Millions of jobs around the world, from manual labor to finance, are also at risk.

As for the future of work, Huang says every founder needs to take responsibility.

"What is automation going to do employment? We don't know, but real humans are at risk," says Huang. "If you're in the boardroom talking about automation, you also need to talk about the human impact and put your employees on top of the list."