The mayor is not on trial in the novel. Instead, he is offering his views during a press conference on crime in the city.
The idea that we're just trying to stop crime in white or middle-class areas is nonsense. Everyone living in the city deserves the same protection.
This inclusion of the mayor simply shows that anyone involved in a crime, or accused of a crime, will be charged and put on trial. The mayor (named as Giuliani in the text) wants everyone to know that he is determined to take care of any crime issues in the city regardless of where the crimes take place. Obviously, he has been charged with the accusation that he does not care about crime in black or low-income areas. His statement to the press is his rebuttal to the accusations.
In the end, the mayor was never in the trial. He was only used as a cut-in in the text.