In my personal experience, it was a redundancy. I never had to turn one off.
The F-18 engine, the F-404, is remarkably reliable, so much so that the Swedes have put it in their single-engine Gripen that they operate in the high north, as well, with no loss rates, as well.
With the technology at the time, why the F-18 had two engines is largely because of its navy-derived character but also because the aircraft engine didn't produce enough thrust. They needed two engines to be able to provide the thrust. Engines, now, produce thrust far in excess of what they did back when I started flying.