Characters like Hercules or Captain America have histories that give rise to reasonable expectations. You can put Hercules in New York and have him get involved in exhibition wrestling, but nobody's going to accept that version as a definitive statement about the character. To say that a story is about Hercules is to give rise to reasonable assumptions about its theme, settings, and the general sort of plot that you will find in it. Likewise, some ass of a writer might think he's clever by making Captain America a coward, unpatriotic, a traitor, or revealing that he really was an illegal immigrant. Probably, that writer is only doing so because he imagines he's too good for the character he's supposed to be writing about. Such a version would be wrong, even if Marvel printed it. Wrong, because that's not the way Cap is supposed to be. Established characters are not the playthings of their current writers.
'Deus ex machina' is likewise a failure of imagination; the manipulation of the plot elements by the writer is too obvious, and suspension of disbelief can't be maintained. This is why I prefer science over magic in superhero books. When the villain has a laser death ray, the fact that it's a laser suggests that a mirror could be used to deflect the attack. It's somewhat grounded, and technobabble has its own charms. Magic, unless it's already developed into a canon (e.g. Medusa turns people to stone with her gaze, so a mirror works here too) offers an open invitation for writers to pull something out of their sleeve. The resulting explanation will seldom be as entertaining as Reed Richards's pseudo-physics, either.
It relates to the function of why genre fictions are genres. In a general way, the character and function of phasers, dragons, magic wands, or warp drive engines is consistent across creative worlds. They don't require a great deal of explanation when introduced.