While these vehicles may all have the code installed
That just means that they have a single common firmware. It doesn't mean 11million vehicles were cheating the emissions testing. When all is said and done, it may transpire that the only vehicles actually "at fault" are the ones in the USA, where the emissions levels for diesel vehicles were set incredibly low.
(And as has been pointed out repeatedly, the ships used to transport said vehicles & parts to the USofA will have spewed far more pollutants in to the atmosphere in that one short journey than the vehicles ever could in their lifetime)