It is pretty obvious that multiple mutable reference is a big problem for data race, but there is also another real point behind it? I mean, some like compilation optimization?
I could not think that the real problem behind multiple mutable reference is just data race.
Holding an &mut represents exclusive access to the pointee, so the optimizer is free to reorder or eliminate operations freely as long as the final state is the same as specified by the program text. Any concurrent access to the pointee (read or write) is UB because it might observe some intermediate states that shouldn’t occur according to the sequence of operations as written in the source code.