So I recently decided to rewatch The Dark Knight trilogy, and while watching The Dark Knight, I noticed something amazing.
If you haven't seen Dark Knight, besides being deprived of one of the necessities of life, there are spoilers ahead.
In the beginning of the film when Harvey flips his coin, he tells Rachel, "I make my own luck." This refers to his coin with both sides being heads. At the time Rachel doesn't fully understand, but then later in the movie when he flips his coin to her, she finally realizes that Harvey was literally making his own luck.
Then after Rachel dies and Harvey is in the hospital, Joker visits him. Joker promises that killing Rachel was nothing personal and then offers his own life. Harvey at this point is no longer the morally incorruptible man that he previously was and flips a coin to decide. He flips the coin and catches it and decides that the Joker gets to live.
Later, Harvey is interrogating Michael Wuertz about who picked up Rachel and he then spins the coin on the bar with the burnt side facing up. Thus, the man will die.
Soon after, we see Harvey in the car with Maroni and his driver. Dent is interrogating Maroni and then flips the coin, catches it and flips it onto his other hand. Maroni gets to live. Then Harvey flips the coin, catches it and flips it onto his other hand and deems Maroni's driver to be unlucky and shoots him.
Then, Harvey takes Gordon's family hostage and is prepared to kill Gordon's son, until Batman intervenes. Batman tells Harvey to point the gun at those responsible, not innocent kids. Harvey agrees and flips the coin to see if Batman will die. He catches it burnt side up and shoots Batman.
Harvey then points the gun at himself, and flips the coin to decide his own fate. He catches the coin with the good side facing up. He gets to live. Then as Harvey flips the coin to decide Gordon's son's fate, Batman tackles him off of the building and the coin lands with the good side facing up.
Harvey Dent starts off the film by stating that he creates his own luck. Harvey continues to create his own luck throughout the film, because no matter how the coin lands, Harvey gets the intended outcome. If he likes the result he catches it, but if he doesn't he will simply flip the coin onto his other hand to change the outcome. So in fact, the entire movie Harvey truly did make his own luck.
Harvey then goes on to say, "The only morality in a cruel world is chance. Unbiased. Unprejudiced. Fair." That is why the only two times that Harvey didn't decide the outcome, (when he spins the coin on the bar and kills Michael Wuertz and when Batman tackles him before he can catch the coin and it lands in favor of Gordon's son) chance was unbiased and fair. Chance decided to kill a corrupt cop who helped the Joker and decided to spare an innocent boy.
Furthermore, based on the previous quote, by interfering with luck, Harvey proves that he is in fact immoral. Joker wanted to break Harvey, not Batman. He wanted to take the "White Knight" and show that even the best of them could be corruptible and turned evil. By interfering with luck, and killing whom ever he wanted on his path of retribution, Harvey Dent allows Joker to succeed.
That is why Batman had to take the blame for Harvey. More than just the fact that hundreds of criminals would be released if Harvey's murders were discovered by the public, had Batman not taken the blame, he would have allowed Joker to win and by doing so destroy Gotham.