A long explination
The computer does shut off the fuel, and the injectors do (or should) stop firing immediately; however, you can still over-rev if the load suddenly disappears.
Here's the (long) reason why:
First, it takes some time before the computer shuts off the fuel. These computers are smart, but not super smart. They don't see the RPM increasing wildly and shut off the fuel before redline, like a (impossibly superfast) human would. The computer simply does what it is told and holds full throttle until the RPM actually gets to the limiter, THEN turns off the fuel.
Once the fuel is turned off, there are still 1 or 2 cylinders that were in the process of firing, and the already-injected fuel has to burn. Remember, we are already AT redline when this happens. This is at least 80 mm^3 per cylinder, and a LOT more on tuned trucks. If you look at a log of a truck in neutral, it doesn't take much fuel (30 mm^3 or less) to hit redline with no load, so even a couple cylinders at 80 - 200 mm^3 will spin it past redline in very little time. The more power you make, the more you'll overshoot redline.
And finally, the engine has not only kinetic energy (it wants to keep turning), but an applied impulse that was accelerating it. That impulse does not immediately disappear when fuel cuts off. Though realistically, I suspect this doesn't contribute significantly compared to the second point.
Hope that explains why and how you'll overshoot your specified redline if you break something.