Here we've got another Greek myth that's pretty similar to Artemis and Actaeon's. Those Greeks just loved them some dude-walking-in-on-women stories.
Here's how it went down: King Pentheus was the ruler of Thebes—in fact, he was the successor to Actaeon's grandfather, King Cadmus. Pentheus didn't take kindly to the god Dionysus, who advocated wild partying and hedonism. As punishment, Dionysus came to Thebes and hypnotized Pentheus into wearing women's clothing.
But the fun doesn't stop there. Dionysus then convinced Pentheus that if he climbed a tree in the forest, he would be able to see a group of women engaged in sexual activities. (Not exactly like Actaeon, since Pentheus explicitly entered the woods in order to see some X-rated activities, but it's pretty close.) Well, the joke was on Pentheus, because the ladies he spied on were not in a loving mood. Instead, he found his mother and aunts, who had been turned into crazed Maenads. They mistook Pentheus for a wild animal and tore him apart. Sound familiar?
What lessons can we draw from comparing the deaths of Actaeon and King Pentheus? Mainly, they both committed acts of hubris, which is what we call it when mortals act like they're equal to (or even better than) the gods. The gods did not like disrespectful mortals. Case in point: when King Pentheus denied the importance of Dionysus, he was eventually ripped to shreds. And Actaeon saw Artemis in a vulnerable state and he was… eventually ripped to shreds.
The takeaway message here is this: when in ancient Greece, always show the gods respect. For much more on the King Pentheus and Dionysus myth, check out Shmoop's take on The Bacchae, a play about the myth written by Euripides.