The generator was installed Thursday, one day after the store's power had been turned off for nonpayment, Upper Darby Police Superintendent Michael Chitwood said.
"It certainly is carelessness, recklessness," Chitwood said. "Do not ever put a generator on inside a building without ventilation."
Police did not immediately know who installed the generator or who was responsible for the electric bill at the Smart International Grocery Store, which had been open for just a few months. The building owner does not manage the store, police said.
The two bodies were found in separate apartments at about 8 a.m. Friday, before the store opened for the day.
The victims are 50-year-old Stephen Butler and 55-year-old Ernesto Huerta. Huerta ran Pinky's New York Cafe on South Street.
"I don't know what to think," said Huerta's grandson, Trinidad Zacatel. "I just miss him a lot.
"He was always there for me and all our family whenever we needed him."
No one else was inside the building, and there were no other injuries, he said.
The apartments had a separate power supply and were not affected by the shut-off. But carbon monoxide filled the store and the two apartments above as the generator ran unvented for 12 hours, the police official said.
"Had there been 10 people (upstairs), there would have been 10 people dead," Chitwood said.
Action News has learned that the store owner had paid enough of his bill to have PECO turn the power back on to the store, on the same day that PECO turned it off. However, the utility has 24 to 72 hours to switch the power back on. The store owner decided not to wait and bought the generator.
The Associated Press contributed to this report.