Oxygen sensor helps the engine in controlling the emissions as the amount of energy that the engine can pull is dependent on a lot of things like altitude, the temperature of the air, engine temperature, barometric pressure, load on the engine, etc. If the oxygen sensor fails, the car starts performing poorly and you end up spending more fuel and money.