I could see how a prosecutor might dismiss the charge, if it were the case that the car did not belong to the defendant, it appears that in fact that he was only in the car to get some CDs, and there was no evidence that he knew about the presence of the beer can or was responsible for its being in the car. But that wouldn't explain the circumstances described by the OP, and the notion that a unit of government is now tripping over itself to pay him money remains ludicrous.