The reason for the mythology is so that Hancock would lose his powers. They needed him to lose his powers so that the criminals could threaten him at the end. See, they had a problem: either they give them powers (which is a problem because you haven't explained Hancock's powers and to give them powers is to explain Hancock); or, they take away Hancock's powers (which presents the problem of ending a superhero film without a superhero - and again, you have to explain Hancock's powers in order for him to lose them). So they did both - created a new superhero so they could have a fight (which was REALLY good) and then said, by them being together, they lose their powers so the end fight plays.
I think, it would've been better, if Hancock just began losing his powers. You don't know why. And he's HAPPY. He can be normal, no pressure, no nothing. But on the other hand - he's supposed to be in jail. People he's pissed off come after him. And so on - lots of drama there. But it doesn't solve the problem. A superhero film ends with a superhero fight. And HANCOCK is all about Hancock's inner problems, not big fights.
So this is the ending instead: Hancock, thanks to the PR, becomes a hero. And he likes being a hero. His PR guy wants to change the world. THEY DO. He takes down terrorists. No one can stop Hancock. It goes to his head. He starts doing stuff like overthrowing corrupt governments, arresting white collar criminals. Before you know it, in true THE AUTHORITY fashion, everyone is **** scared of him. And the UN set the biggest military trap and set Hancock up to be arrested/killed. That's your finale. Hancock versus the world. Can he see he's doing more damage than harm before he kills everyone? It mirrors everything - the film is about a hero who thinks he's helping but is in fact, hurting everyone. This climax takes that point to its emotional extreme. Naturally, Hancock pulls away, we have a happy ending (because we want to because we LIKE Hancock), but... still...