Essentially, the box was a wedding gift from Zeus (I think) for Pandora, though it was a trick. Though he told her "Don't open the box". It contained diseases and a whole bunch of bad stuff that humans still deal with today, anger, hatred, greed, jealousy, and so when Pandora got too curious, she unleashed all of that. Realizing, she shut the box as fast as possible, and the only thing left in the box was hope. So even with all of the bad stuff, hope was never lost. I'm guessing the box was created first and then the cancers were created inside. Or they had to very carefully place cancer in the box. Kind of a ship in a bottle thing.