An oxygen sensor in the exhaust stream can make confident there is adequate oxygen accessible for the catalyst to function and adjusts matters if vital.
For instance, the catalytic converter uses a catalyst and oxygen to burn off any unused fuel and certain other chemical compounds in the exhaust.