Firstly, I don't think it's entirely clear whether the entire premise of the question is correct. I couldn't find any evidence to suggest that plants don't thrive on highways and areas with lots of cars. If anyone has any data on this, I'd be interested in reading it.
Some of the answers here seem to be a bit light on evidence. Let's look at some data on this.
This report shows that there can be around 1.5-2x increase (from the baseline level of around 410ppm to between 600-800ppm) of CO2 levels in areas surrounding highways. This value varies somewhat depending on whether it is peak time or not, but it seems like the median amount is around 600ppm. I'm aware this is only a single study, so it's perhaps not best to generalise too much, but it should give us a broad idea of how much CO2 increase to expect in areas surrounding highways.
In contrast to what jamesqf said, CO2 enrichment does increase the growth rate of plants, under certain conditions. This has been known for quite a while. Mauney et al (1987) state:
Comprehensive reviews of the plant science literature indicate that a
300 part per million (ppm) increase in atmospheric carbon dioxide
(CO2) concentration generally increases plant growth by approximately
Importantly, the range of increase that you see in areas surrounding highways certainly increases the growth rate of plants. Ainsworth & Rogers (2007) state:
Across a range of FACE experiments, with a variety of plant species,
growth of plants at elevated CO2 concentrations of 475–600 ppm
increases leaf photosynthetic rates by an average of 40%
Furthermore, a recent study showed that the human-caused increase in CO2 levels has actually caused a relative greening of the worlds global vegetated area. So this isn't just an effect of ideal conditions in FACE experiments, it also occurs 'in the wild'.
However, it's not quite as simple as increased CO2 -> increased growth. As we can see from the figure above, the levels of CO2 in the highway vary temporally between peak and non-peak times. Fluctuations in CO2 levels actually reduce the growth rate of plants, for various reasons. White et al (2020) state:
..we calculated that yields increased 65% as much in fluctuating
elevated CO2 of FACE as in constant elevated CO2
So it certainly seems like this might have an effect of reducing plant growth on highway areas.
As other people have alluded to, the other thing to remember is that cars produce a high level of other particulate from the exhaust fumes, which certainly have a large negative impact on the growth of plants. Power et al (2011) state:
A wide range of effects were detected, including growth stimulation
and inhibition, changes in gas exchange and premature leaf senescence.
This was complemented by controlled fumigations with NO, NO(2) and
their mixture, as well as a transect study away from a busy inner
London road. All evidence suggested that NO(x) was the key phytotoxic
component of exhaust emissions, and highlights the potential for
detrimental effects of vehicle emissions on urban ecosystems.
Overall, it seems likely that a combination of fluctuating CO2 levels (rather than constantly high levels) and particulate pollution might cause a reduction in plant growth around highways.