Every day, thousands of New Yorkers open their doors to find cardboard boxes neatly packed with the groceries they just ordered by phone or computer from the delivery service FreshDirect. It sounds simple enough. But each of those boxes — some sent as far as Philadelphia and Stamford, Conn. — requires the collecting, shipping and sorting of food from around the region, the country and often the world. On a recent Monday afternoon, the Dining section put the system to the test, submitting an online order that arrived a little over 24 hours later. Everything came together in the company’s 300,000-square-foot warehouse in Long Island City, Queens, where 500 employees, including 100 cooks working in more than 30,000 square feet of kitchen space, had a hand in that day’s deliveries.