To what extent is Rust's ownership and mutability rules useful outside of memeory safety?
For example, if Rust had a garbage collector would it still make sense to have mut, &, &mut, move, .into_iter(), .iter_mut() etc. Most garbage collected languages that I'm familiar with (eg JS, Python) seem to just make everything a mutable reference, something like Rc<RefCell<T>>. However, maybe this is just because they are older languages, and they might be designed differently today. I'm not familiar with modern languages like Swift and Kotlin and whether they share any similarities with Rust. To me it seems like at least some of Rust's rules are more useful than just for memory safety in that they discourage spaghetti code and unexpected mutations.
Edit: thanks for all the great responses, it seems like the answer is a resounding yes, the rules are very uesful, not just for memory safety.