The O2 sensor monitors and constantly adjusts the mixture.
Usually, when they go bad, the car goes into default mode, which is to run rich. (If default mode were to run lean, you'd burn a piston). That is why replacing a bad one usually increases MPG.