One strong possibility is Bill Barr was always a liar and a weasel.
He may have taken the job as a way to get inside the Trump administration, undercut it, and act as a blocker for any effective action against those working to get rid of Trump.
His actions show he was very effective at undercutting the administration and blocking action against those working hard to get rid of President Trump.
More likely Barr was a get along to go along type and go along to get long type of beurocratic person. But Trump doesn’t care about getting along to go along and wants things done now. Barr says he can’t do what Trump wants, “you don’t understand how things work.” But is Barr who doesn’t understand and gets nothing done. He gets fired or resigns depending on what source you want to read. So in the end Barr is disgruntled and becomes a nevertrumper trying to get even.