Mutable aliasing is when we hold two mutable references to the same data. This can become a problem.

    std::vector<T> vec;
    auto & item = vec;

    for (auto & x : vec) {

The problem here is that do_stuff can mutate the vector and thus invalidate the iterator, causing undefined behavior.

Some languages just avoid mutable state altogether (or mostly). Rust simply checks that there is no mutable aliasing at compile time. If that's not possible then this can be done dynamically (at a cost using RefCell).

Not only can mutable aliasing cause undefined behavior in some programs, it can also cause logical errors. If your code holds some mutable reference and assumes that some invariant is upheld due to its own usage, another piece of code may break that invariant.