From the Super Mario Wiki
Mushroom Cars are a particular type of car found driving on the main streets of the Mushroom Bridge and the Mushroom City courses in Mario Kart: Double Dash!!. Though they appear to be an obstacle, they are actually helpful to the drivers.
When a player bumps into a Mushroom Car, one Mushroom will pop out and land on the road. Though the car slows the player down, it does not make them spin. The player can then drive over the Mushroom and receive a brief burst of speed that may help him or her get ahead in the race. Of all the obstacle vehicles driving on the road, only the Mushroom Car is helpful. This vehicle, however, does not appear in Time Trial mode, even in the Mario Kart DS remake of Mushroom Bridge.