what kind of car? IF its fuel injected the key turns off the computer, the fuel pump, and the ignition coil
Because you turned the key.
On a carburated vehicle the power to the distributor and coil is cut off when the key is turned off causing it not to fire.
The service engine did not shut your car down, It was the part that turned the light on, (not the computer monitoring system) You need to determine what turned the light on that's very likely what turned your car off.
That is because when you brake, your body pushes forward and makes it feel that the car shut down. Your mind makes it feel that way.
One of the doors is open (or not shut properly).
Some cooling fans will stay running even if the car is shut off to cool down the motor. Once the fans thermostat gets tripped to shut off, the fan will continue to run.
ggd
the car alarm will allow the car to start and run briefly then "shut down".
Has the car got climate control ?
I don't know what kind of car you have but the heated seats in my Equinox shut off when the key is turned off.
Fuel pump will not run and engine will not start.
Yes , once it's turned off and locked