The liquid hydrogen goes through a fairly complex path on the way to the combustion chamber. First its pressure is boosted by a low-pressure turbopump, then a high-pressure turbopump running at very high power levels. Then the fuel is routed through many small pipes and manifolds which encircle the engine bell, combustion chamber, hot gas paths and gas generators. The cold hydrogen cools these hot parts, keeping them from melting. The now not so cold hydrogen gas is fed into the gas generators, where it is burned with some of the liquid oxygen (which comes from its own set of turbopumps) to form hot, hydrogen-rich steam. This hot gas turns turbines to power the hydrogen and oxygen high-pressure turbopumps, then is fed into the main combustion chamber and burned with the rest of the liquid oxygen.
Running the engine dry on hydrogen is bad. First, you’ll lose your source of cooling before combustion stops. Secondly, as the combustion in the gas generators goes from hydrogen-rich to a oxygen-rich as the hydrogen drops off, the temperature in the generators will increase significantly. With oxygen-rich combustion and no cooling, the walls of the hot gas paths and combustion chamber will burn through. The combination of hotter gas coming out of the gas generators and no hydrogen coming into the high-pressure hydrogen turbopump can cause the turbine to overspeed and disintergrate.
Basically, you’ll at the very least ruin the engines, and may cause an explosion that damages other things in the engine compartment.
On a normal mission the fuel cutoff sensors aren’t needed - the shuttle shuts the engines off when a predetermined velocity is reached, before the fuel tank runs dry. But certain abort modes require the engines to run as long as possible, and a fuel leak in an engine can cause the tank to run dry prematurely. IIRC, this has actually happened once - a small leak in an engine cooling line caused a slightly premature shutdown on one mission, although the shuttle was able to make it to orbit anyway.