You're partially right, SB. When Ailes hired her in 2009, there was every indication that she was going to run for President and might actually win. He thought that he could play queen-maker and shape her into his very own Eliza Doolittle. however, like the Corrupt Bastards Club in Alaska before him, he found out that Palin could not be controlled, and so he found himself "stuck" with her for the duration of her three-year contract. It's been obvious for some time that he's been actively trying to get rid of her, without actually firing her himself, by trying to goad her into breaking her contract on her own.
Your absolutely right, you said exactly what has been going on..once Sarah realized what was going on the relationship between her and Ailes became strained..she has hardly been on Fox anyway, once in a blue moon..O’Reilly acted like an ass when she was on his show..that was probably Ailes doing too, try to make her feel as uncomfortable as possible so that she would not want to come back