First, you're assuming that Mattis doesn't agree with the new policy. I have my doubts about that. Second, Mattis is a professional military officer. I am certain that in his long career he has been given a lot of orders he didn't agree with. I am certain he followed those orders anyway. That's what a professional officer does. Thirdly, the idea that Mattis would be "selling his soul" is purely fabricated by you based upon your own opinions and your well established hatred of the President.
I'm not proposing that either Mattis agrees or doesn't agree with the policy. I'm proposing that Mattis had no idea that the Policy was going to be rolled out imedeatly. I'm proposing because the Pentagon was caught flat footed is because Mattis was caught flat footed. Had Mattis been aware it was happening then the Pentagon would have been prepared for it. I mean that is what a professional does after all when it comes to policy.