Maniac is upset with himself for crossing the finish line backwards when racing with Mars Bar because in doing so, he is rubbing his victory in the face of his opponent. It is bad enough for Mars Bar that he loses to Maniac in a race in which he, Mars Bar, had issued the challenge, but when Maniac crosses the finish line backwards, Mars Bar's loss is accentuated, and he is truly disgraced in front of all his friends. It's kind of like in baseball, when a person hits a home run and stands there at home plate to admire it while the opposing pitcher stands, embarrassed, on the mound, or in football, when a player makes a touchdown, then slams the ball down and goes into an elaborate dance of victory right there on the field. Such behavior is not considered to be good sportsmanship, and, at its worst, is insulting to the opposing team.
Maniac had not meant to exhibit unsportsmanlike behavior. He had simply been caught up in the moment, "feeling...sheer, joyful exuberance, himself in celebration". Even so, "that didn't make it (an) any less stupid or rotten thing to do". Maniac holds no ill feeling towards Mars Bar, and he regrets having acted in a way that embarrassed the other boy. It is true that Mars Bar had been going out of his way to cause trouble for Maniac because, as a white boy, Maniac had dared cross over into the East End of the city, which is inhabited predominantly by black people, but Maniac had still never meant to get back at Mars Bar in this way. Although there is a moment in which Maniac questions his own motivations, it is generally totally out of character for Maniac to act in a way that is deliberately demeaning to others under any circumstances (Chapter 38).