Perseus knows from the conventional wisdom that fighting Medusa is a fool's errand, that to look in her eyes is death; yet he can't help himself, and in spite of common sense, he sets off to kill her. Too clever for his own good, he takes a polished shield that shows her reflection. Not only does he succeed in his mad quest as a result of this ingenuity, afterward he runs around using her head as an ugly-laser.
King Leonidas of Sparta goes to the Oracle to ask what he should do. The Oracle tells him either Sparta will fall, or you will die. Disgusted that a Greek oracle would suggest to a fellow Greek that they lay down in front of Xerxes, Leonidas leads the Spartans at Thermopylae. Whatever part of that story is real, we know that a) Leonidas really did lead the Spartans to fight and prevail against the Persians at Thermopylae, and b) the story as it's been handed down contains Leonidas's rejection of the Oracle. Because of this, Western civilization exists as we now now it.
Odysseus was told that no man could resist the call of the Sirens. Like a smartass he tells his men to cover their ears, and bind him firmly to the mast of the ship so he can hear them without jumping overboard. He hears the Sirens and once the ship has passed out of earshot he is no worse for the wear, though through his innovation he has experienced something supposedly fatal to mortals and defied the natural order.
Why Set Up Conventional Wisdom to Only to Reject It?
One of the functions mythology accomplishes, in its more coherent moments, is to transmit mores. Most of the time this is clear. Listen to Jehovah; if, despite direct commands from the Almighty, you give in to temptation like Lot's wife did, you will be smitten. Clear enough - which is why some of the Greek myths start to seem very strange indeed. Why would Greek myths so often set up a value or more, and then show how moral or cosmogonic authority can be dismissed with critical thought and persistence?
Imagine that, like Perseus, Lot were celebrated for overturning the established order, and doing an end-run around God by giving his wife a mirror with which to look back at burning Sodom. The Old Testament would have a different flavor.
Is This Aspect of Greek Myths Unique Among Ancient Cultures?
Is it possible that the Greeks were unique in incorporating directives to critical thought in their myths so early? To do this concretely, you would be forced to invoke some established wisdom, and then show how a hero could succeed by applying a new solution to an old problem. I have often wondered if the impact of Athens on the modern world was not a coincidence of history, that they were fetishized by the later Roman Empire who spread their work around Europe and the Middle East and it could have just as easily been the Lydians or the Cyreneans. (I've had the same questions about whether grapes are really any more characterful as the basis of a fermented beverage than say, apples.) If the Greeks were unique in so early celebrating as virtues critical thought and the rejection of static groupthink, this constitutes one argument for the uniqueness of the classical period and its contribution to world history.
Could Greek Myths Be a Palimpsest of Bronze Age and Classical Mores?
Another and not necessarily mutually exclusive explanation is that what we're seeing are bronze age myths with the standard structure of human fables, plus a layer added later, during the classical period.
In this view, maybe in the original "pre-rationalist" Mycenaean version, Perseus kills Medusa by luck or resists her power because he's Zeus's son, and the mirror trick was added later. Jason and the Argonauts encounter the Siren. As royalty (authority), Jason is able to outplay the Sirens, and the sailor who jumps off his ship is saved not by his own cleverness, but by a god. For this reason it's worth investigating whether the passage of Odysseus through the Sirens was a late addition to the Odyssey.
It should be stressed that this kind of shift-in-values-over-time is often investigated in epic works that seem to have accreted narrative from temporally-separated contributors, Beowulf being one example. Another is the Mayan Popol Vuh, which features Twins Hunahpu and Xbalanque defeating a whole pantheon of gods. Westerners don't typically draw a distinction between classical and post-classical Mayan periods, and the Popol Vuh is a K'iche' story from a post-classical culture in the Western highlands, separated by several centuries and more than a hundred miles from the much more famous earlier religious centers in the Peten lowlands. The interpretation is that the K'iche' were mocking the religion of their predecessors by incorporating its figures into their own myths and denigrating them.
It's worth noting that Beowulf and the Twins of the previous examples are "normal" exemplars of virtue who, like the heroes of the vast majority of human mythology, succeed by dint of their adherence to concrete ideals and their position within an authoritarian hierarchy (royal or divine heredity, or a mandate from a god or king). They aren't smartasses like Perseus and Odysseus.