O’Reilly gets the boot … then he gets a lot of dough!

I am not too proud to admit that I do not know about a lot of things.

The Bill O’Reilly story has me confused. I’m baffled, befuddled and bedeviled.

Some women accused O’Reilly of sexual harassment. He paid some of them with millions of dollars in settlements. Fox News Channel, where O’Reilly worked until just the other day, shelled out big money, too, to the women.

Advertisers bailed from O’Reilly’s show, costing the network millions of dollars in revenue. O’Reilly then goes on “vacation.” Fox decided this week to cut O’Reilly loose. O’Reilly has denied the accusations of harassment.

Fox felt the pinch from the revenue loss.

But then the network has decided to pay its former talk-show colossus the equivalent of a full year’s salary.

How much is that? It’s being reported to be in the neighborhood of $25 million.

If someone is let go for cause — which is how I am interpreting Fox’s decision to part company with O’Reilly — how does a former employer justify paying out that kind of cash?

What in the name of TV ratings am I missing?