Don't lie: when you first met Mars Bar, didn't you think he was going be the bad guy? He's got all the right attributes: a huge ego, can be a little mean, seems to hate our hero. They even go head to head in their very first meeting: "Maniac blinked and stepped back. The kid stepped forward. They traveled practically half a block that way" (10.21).
So, where does the "good" part come in? It takes a while, but eventually Mars shows his softer side. That's not too surprising. What is surprising is that this good side only appears after Maniac drags him into the McNab house for maybe the worst birthday party ever.
We don't exactly know why, but it probably has something to do with Mars figuring out that Maniac is like the other white kids. He's brave and kind, and so he and Mars find common ground out in the early-morning streets. They stop racing each other and end up running alongside each other instead:
Morning after morning it happened this way—the two of them dovetailing at an intersection, and, without the slightest hitch in stride, cruising off together. Though each face showed no awareness of the other, they were in fact minutely sensitive to each other. (44.10)
This is just what Maniac needs: someone to run with him and to make sure he's not alone. And this is also what Mars needs: someone who challenges him, someone he knows he can't beat with some trash talk and just a little effort. It's even better that he and Maniac don't love each other from the get go: they earn their friendship.
It's not just the candy bar. It's the attitude, the shuffle, and the nickname. Like Maniac, Mars is a legend in his own right. For Pete's sake, he can stop traffic! On both sides of town!
Not only did he shamble, jive, shuck and hipdoodle at his own sweet pace, he did something he had never even done in the East End—he came to a complete and utter halt halfway across and let nothing but the evil in his eyes take care of the rest. (41.14)
We've never seen Maniac do that. Just sayin'.
But wait, Mars Bar ends the story not just as Mars, but as Mars Bar/Snickers, after Amanda changes his nickname, saying "'How bad can you act if everybody's calling you'—she said it loud—'Snickers?'" (46.12) So Amanda figures out what Maniac already has: Mars has the attitude, the shuffle, the nickname, but he's also just a boy who's worried enough about his friend in the buffalo pen that he wakes Amanda up in the middle of the night.
That's right, Snickers has a heart. (Is it the creamy caramel topping?)