New Rust developers regularly hit a compiler error on code that looks completely reasonable — a function that reads a variable after passing it somewhere else, or two parts of a program that each want to modify the same piece of data. The borrow checker isn't malfunctioning in these cases; it's catching a real category of bug other languages simply let happen at runtime instead.

Rust's memory model rests on one rule, enforced entirely at compile time: every value has exactly one owner responsible for cleaning it up, and at any given moment, code can have either one mutable reference to a value or any number of read-only references to it, but never both kinds at once. That rule is what the borrow checker is actually verifying every time it rejects a piece of code — not style, not syntax, specifically that rule.

The reason the rule exists is what it prevents: a data race, where two parts of a program access the same memory at the same time and at least one of them is writing to it, is undefined behavior in languages that don't guard against it at compile time — a class of bug that's notoriously difficult to reproduce and debug because it depends on timing, not on a fixed input. By making the one-mutable-or-many-read-only rule a compile error instead of a runtime possibility, Rust turns an entire category of hard-to-reproduce bugs into something the compiler simply won't let ship.

This is also why the compiler's error messages tend to name specific line numbers where a "borrow" starts and ends: the checker is tracking, for every reference in the program, exactly how long it's valid and whether any conflicting reference overlaps with it in time — not just whether a variable exists, but whether two particular borrows of it are ever alive at the same moment.

The tradeoff is real and worth naming plainly: code that would compile and run fine, most of the time, in a language without this check gets rejected outright in Rust, and learning to structure code the borrow checker accepts is a genuine, sometimes frustrating learning curve. What that curve buys in exchange is a guarantee most other systems languages simply can't make — that if a Rust program compiles, an entire class of memory-safety and data-race bugs is provably absent from it, not just less likely.