Most of the time it's unanimously agreed to follow the majority of minors. Everything runs smoothly.
When that's not agreed, preventing a fork requires some way of blocking the non-majority miners. That is an attack, and not just 'how bitcoin works'. Bitcoin has no builtin way of handling such disputes.