Walking away is more the action of a neutral or otherwise apathetic character in my opinion. In theory, a "good" character wouldn't just leave that house, and willingly allow others to fall into the same trap. A good character would want to find some way to avenge the person they went to help, exorcise the house, or otherwise sabotage the Daedric prince's plans or influence...even if it possibly meant temporarily siding with the priest of another Daedra as an "enemy of my enemy" type deal.
Except that being a good guy doesn't mean you're capable of contending with or fighting against a Daedric prince.
Yeah, good guys in stories, when forced into something like that, are still good. They just say "You stupid bastard.. why did you attack me?" or something along those lines.
What are you smoking? Good guys in what stories?
If youre a good guy, and someone is trying to kill you - you kill them first. That's what good guys do. Hell, you couldn't have made it to Markarth in the first place without killing anyone who was trying to kill you.