I assume they talk and come to consensus. If a majority feel that X is the right decision, then it would be very difficult for the Chief to write it unless he went along with them… After all, ultimately he cannot order anyone to sign a decision they disagree with. He can assign the job to write an opinion, but the others have to sign that they agree with the arguements. If 4 Judges say “law upheld for reason X” and one says “Law upheld for reason Y, but not X” then its an ambiguous decision. They can expect a flurry of cases based on X or Y to clarify the ruling. SCOTUS is a master at kicking the can down the road when pressed.
They all have the nuclear weapon, to air the split openly if the Chief decides to throw his weight around, also knowing that ultimately too nasty a confrontation will end up as fodder for impeachment hearings - which means that the nuclear weapon has to be used with an eye to how Congress (and public opinion) will see it.
So they all have an incentive to observe decorum and behave.
Why wouldn’t a chief switch if he’s going to lose anyway. He exercise privilege to write the opinion,could slip some text into the ruling that may open up oppportunities to “clarify” the judgement in future cases… but none of these are dummies, so it won’t be too blatant or they won’t sign it.
Also, yes, you dont get to the top of too many things without some ego. These guys have to be looking at their place in history. Twisting logic to meet partisanship is possible, but they recognize that it will be their legacy that they destroyed the last reliable institution of the government if they take that too far; they are not going to ignore precedent, but often the supremes realize that sometimes there are ideas whose time has come - or gone - and precedent will be overturned. Generally, that happens with strong consensus.
From what little I’ve read about how it operates, the Supreme Court operates as the ultimate committee.