Guns are for...
G.U.N. Commander: Right Shadow ! You get this back after passing a G.U.N, firearms safety course.
GUN Commander: DON'T POINT AT ANYTHING YOU DON'T INTEND TO SHOOT! Last warning or you don't have access to the weapons locker for six months..
Shadow: Try an stop...
GUN Commander:...and no pudding!
Actually, Sonic having a Gun isn't a problem. In fact, I actually wonder WHY he hasn't been given one? Only explaination is that he either doesn't like killing, or he got in an accident with a gun. (E.g. Being stupid enough to LOOK DOWN THE BARREL OF A LOADED GUN, and the Gun Discharging and barely missing him. Yes, it's happened before IRL.)
I mean, the games don't exactly explain WHY he has a car in the first place. Shadow has a motorbike because he WANTED one, and it's stated by Rouge that he doesn't need one. Sonic doesn't state a desire to have a car in his other games, or even his comics.
There's no real explaination as to WHY Sonic has a car in the races... And we haven't exactly been GIVEN one. There's no given "Race Rules" in-universe to state why they need cars or bikes, and only leaves Assumptions.
Shadow is the dark vigilante type who uses guns and combat all the time but Cream doesn’t like that since she is the peaceful happy type, a rather funny but nice scene here