there are two types of filament runout detector.

The first - and cheapest and most common - consists of a physical endstop in a tube. The filament runs through the tube, keeping the switch closed.
It only does one thing and that is to stop the printer if you actually run out of filament.
Now assuming you look at your filament spool and slicer before printing. You SHOULD always know whether you have enough filament for the job.
So you should never run out of filament - well in 8 years and thousands of prints, I never have
So type 1 is pointless. But you do get a spare endstop - and they are always useful :-)
Hell I've even used them as on/off switches for computers :-)

Runout sensor type 2.
Consists of an optical sensor and a roller. - pretty much like how the old computer mice used to measure movement. And I wouldn't be at all surprised if those sensors are exactly what they use.
And that's the key phrase: type two measures actual filament Movement.

So while you should never run out of filament, there are a bunch of reasons why the filament might get jammed or just stop feeding.
Type 2 will register this and stop the print.

So filament sensor type 2 is a potentially valuable addition to a 3d printer.
Type one is a free endstop :-)