The reasons for this can vary depending on the type of computer and the car, but some common issues that can cause this are:
1. Incorrect or faulty software: If the car's computer has incorrect software or glitches, it may disrupt the engine control systems, causing the engine to cut off while driving.
2. Electrical issues: If the computer's electrical connections are faulty, it may not receive the necessary power or signals from sensors and actuators, causing the engine to shut down.
3. Sensor malfunctions: Faulty sensors connected to the computer can send incorrect signals, leading to incorrect calculations and engine shutdown.
4. Wiring problems: If the wiring between the computer and other components is faulty, it can lead to signal disruptions and potentially cause the engine to turn off.
It's important to note that a car engine shutting off while driving is a serious safety issue and should not be ignored. If you encounter this problem, it is recommended to have your car diagnosed and repaired by a qualified technician to identify and fix the underlying cause to avoid further issues or potential accidents.