A weak or slowly clogging cat will cause the O2 to read funny, thus trip the check engine light. Replacing the cat, or opening up the cat, fixes the O2 reading to be normal again. If left to continue, the O2 will eventually go bad as well. The two go hand and hand.