Exhaust pop/bang is not digital sound. Sound inside the car is.
It's an interesting question how do they do it. I can see two ways, one is that the emissions are measured in Comfort/Default modes which do not pop and bang, other way is that the amount that gets "popped" is so small that the emissions are not really affected.
Btw whole point about it being remnant of the inefficient engines of the past is missing the point. Cars, especially sporty cars are filled with unnecessary stuff, from spoilers and diffusors, to quad exhausts for 2 liter engine to even fake exhausts. These things are added to add character to the car, sporty cars get diffusors, spoilers and exhaust pops because consumers want sporty cars that look like that, probably because we've been conditioned to see sporty cars look and sound like that.
I wonder if in 20-30 years time new generations will see silent cars as sporty (electric) while noisy cars will be seen as slow.