If it went into limp mode, the Check Engine Light (picture of an engine) should have been lit on the dash and you should have been limited to about 2,000rpm or thereabouts.
If it was a D40 STX Dual Cab, the DPF might have been full and unable to conduct a regen cycle. I'm not very surprised, for a demo model, as most people seem to take demo models out of the yard, thrash them and return. The ECU gets no time to conduct a regen.
I'd guess this one probably tried and failed to do it itself enough so now the dealer has to force it.
In normal vehicle use, it's rare for it to happen, but can happen for more than just full DPFs too. Any fault which could result in damage to the motor could trigger the ECU into Limp Mode. It's a safety feature. You can reset it (pull the negative battery lead, turn on the ignition, count to 10, turn off the ignition, replace the negative battery lead). If it enters limp mode again, it goes back to the dealer for attention.
I'm happy that it does this rather than just stopping and quitting. If I'm somewhere west of Wilcannia and something goes wrong, at least I have the ability to drive into Broken Hill and get it checked, rather than wait among the snakes and roos for roadside assistance.