You're right. Why ditch a gun so close to the scene of the crime?
It bugs me to no end that some folks keep saying that the teens "fled the scene." They didn't flee the scene, they fled a madman shooting their car up. They "drove" (if you can call backing up through a parking lot "driving") to the where they just left because they knew people were there.
Also, if Dunn was so afraid of the "gangsters" then why did he drive by them in the adjacent parking lot
and why didn't the "gangsters" shoot at his car as he drove by?
IMO, Dunn's story just doesn't add up.