Who said anything about Batman every really having a 'happy ending'? It fits the personality and motivations that we've been presented with over the years. With the ultra obsessed Bat-jerk... he doesn't get a happy ending. He dies in an alley to stray bullet... or gets old and bitter when even he can't live up to his own standards.
Sometimes a happy ending is a disservice to the character.