When Zeus was so angry at Prometheus for giving people fire, he was also mad at the people who had tricked him into taking the wrong bag of meat. Zeus got back at the people by getting Hephaistos to make a beautiful woman, whom he named Pandora (which means all-gifts).
Zeus sent Pandora down to earth and gave her as a present to Prometheus‘ brother, Epimetheus. Zeus told Epimetheus that he should marry Pandora. Also, Zeus sent Pandora with a little box, with a big lock on it (Actually in the earliest versions of this story it is a sealed pottery vase). He said not to ever open the box, and he gave the key to Epimetheus.
But Pandora was very curious about what was in the box. She begged Epimetheus to let her open it, but he always said no. Finally one day he fell asleep, and she stole the key (or broke the seal) and opened the box (or vase).
Oh! Out of the box flew every kind of trouble that people had never known about before: sicknesses, and worries, and crimes, and hate and envy and all sorts of bad things. The bad things all began to fly away like little bugs, all over the place. Pandora was very sorry now that she had opened the box! She tried to catch the bad things and put them back in the box but it was too late. They all flew away.
But the very last thing to fly out of the box, as Pandora sat there crying, was not as ugly as the others. In fact it was beautiful. It was Hope, which Zeus sent to keep people going when all the nasty things got them down.
The story of Pandora explains why bad things happen to good people, by telling us that it’s because our ancestors were bad, long, long ago. We owe a permanent debt because they tricked Zeus with a bad sacrifice. The Jewish Bible has a similar idea with Adam and Eve eating the apple.