O'Reilly's behavior was apparently acceptable at Fox until it became publicly known (Fox knew internally).  Once it became publicly known Fox found it unacceptable.  That means Fox accepts and permits such conduct as long as it can keep it quiet.  That is the problem.