I think Mayo was promised the Head Coaching job.
I am guessing O'Brien saw the handwriting on the wall and that Bama was going to be crap (by their standards) and got out while the getting was good.
If he was promised anything post Belichick, I am guessing it would be he would have a job like being the Head Coach of the offense where he would have total control and Mayo would be head coach and primarily focused on the defense, special teams, and overall team. We see a few of those head coaches today where they really are more glorified coordinators where they only focus on one side of the ball and lets someone else run the other side.
If Belichick retires or is fired after this season, I hope whoever they have at head coach they get someone more innovative to be OC. Mike McDaniel is a bit goofy as a head coach, but he has really transformed the Dolphins' offense into a powerhouse with a QB who really isn't much better than Mac Jones.