Why do Gordon and Batman choose to pin Two-Face's crimes on Batman?
A number of reasons:
1) When Dent had Gordon's family at the place where Rachel died, the police had a border already set up. By this time, Joker was in custody. Had they blamed Joker, everyone would have known they were lying. That would prompt an investigation into the other deaths. Batman and Gordon wanted to preserve Dent's image as the "White Knight," giving the citizens of Gotham hope.
2) Batman wouldn't want to falsely pin crimes on even someone like the Joker.
3) After the events of The Dark Knight, Batman can no longer allow himself to be affiliated with Gotham Police without risking more deaths. By "rebranding" himself, he not only severs all ties to authority, he is also "becoming the villain." As Dent is allowed to die a hero, Batman must accept the opposite responsibility. (i.e.- Dent's phrase, "You either die a hero or live long enough to see yourself become the villain.")
4) Harvey Dent is a leading prosecutor. If word was to get out that he's a crazy killer, all the crime bosses in prison would have sufficient grounds for appeal. All the convictions of all the cases Dent has ever tried could be overturned, and all the crime bosses would be back on the street. The movie mentions this a few times. In their first meeting, the mayor cautioned Dent that he had better watch himself, because all they need is a little dirt on him and all the cases would crumble. During the scene where Dent threatens the fake honor guard who was actually a paranoid schizophrenic, Batman warns Dent that killing him would put all the cases in jeopardy. Batman reiterates this to Gordon at the end.
5) During their final confrontation, the Joker explains that Batman's weakness is his adherence to rules. Why abide by a code when your enemies obviously don't? Pinning Two-Face's crimes on Batman is sending a message to the public, and it's not a terribly positive one. This also plays into his psychological dilemma evidenced by the line "I've seen what I have to become to stop men like him." (Another possible interpretation in this vein is referenced earlier in the film. The point is made that the criminals are not scared of Batman because they know he won't kill, making him less effective. By pinning Two-Faces crimes on Batman, it changes that perception, striking even more fear into the criminal mind.)
6) Giving Batman a villainous public image should prevent any further copycat batmen harming themselves and others
7) Since he began his fight on crime, Batman has, inadvertently, become the glue that holds Gotham together. Alfred tells Bruce after the Joker shows up that he can't quit, and that he would have Bruce endure because he can make the choices no one else can make. The decision to take the fall for Harvey was the only way to keep the crime bosses/criminals from being released from jail and to keep the city inspired. The personification of Batman is the only image/symbol strong enough for Gordon to use, which could convince the people of Gotham to believe the story that Batman, not Harvey, was responsible for those deaths. It would not have been very convincing or ethical to blame those crimes on another person/criminal. This was Bruce/Batman's way to be whatever Gotham needed him to be.