That is a good question. Here-
Your engine management and your transmission is controlled by the PCM. As you know, all computers crash, all software has bugs, and mechanical equipment fails. And many PCM units can go into ''Limp mode''. When it detects that something semi-serious is wrong, it enters the limp mode, which means that the engine won't rev beyond a pre-programmed speed, you can't accelerate very fast, or you may indeed be speed-restricted to 40 mph or similar. The transmission may even stay in one or two gears. Bad? Well, no, not really: The alternative would be to either let you drive at regular speeds, with the danger of letting you trash your car.
With that said I have NEVER seen OR heard of any of our cars ACTUALLY doing ANYTHING like this. I think this is an issue with mainly OLDER cars. Such as OBD1.
I know you are posting this because of an earlier comment said by one of our members. Again I can assure you all you need is a MAF tune to correct the fuel trims if ther is no vacume leak present.