In general, it's not a protection from gross negligence and/or fraud.
The problem is that in cases like these it's extremely difficult to prove such a thing, especially considering it's over many decades and potentially dozens of people.
There's also a bit of practical concerns where criminal prosecutions don't want to pick cases that are tough to win as it'll be resource intense to pursue them.
Of course like the Volkswagen situation you reference (in Germany) where the corporation operates may impact criminal prosecution.