The diesel electric locomotives have large, powerful electric motors on the wheel axels themselves. It is really neat to see if you ever get the chance. The train is driven ONLY by the electric motors. The diesel engine drives a massive electrical generator, and that generator drives the electric motors.
Your typical car hybrid has the ability for the gas motor to directly drive the wheels of the car, just like in a normal car. It also has the ability for the electric motor to drive the wheels of the car. And, they can both drive the wheels at the same time, or either of them can drive the wheels by themselves.
So that is the difference, whether the fossil fuel engine can directly drive the wheels of the vehicle.
The diesel locomotive solution is indeed a better approach, in that the fossil fuel engine can run at optimal efficiency at all times, with the vehicle speed regulated by the electric motor. It’s also a simpler mechanical situation, as you do not need to have two different power sources driving a single axel. You also don’t need a transmission. You do, however, need a larger electric motor than the typical hybrid has, and a much larger generator than normal. I still see it as a win.
I think only the Chevy Volt ever adopted this scheme in a road car. I have also wondered why this approach is not more common.