To make performant code sometimes requires implementing or using "unsafe" functions (it's not obligatory, and a lot of projects don't use them; but it was probably needed to map Bun's behavior 1 to 1). Those require upholding some invariants that cannot be checked by the compiler. The compiler basically goes "I trust you on this one, programmer. If you fuck this up, unsafe behavior can propagate to the rest of the code".
It doesn't. The rust compiler exposes a rich type system by which the programmer can make safe abstractions around unsafe code that can't be misused, but it doesn't (and fairly fundamentally can't, thanks to Rice's theorem) verify that people who write unsafe code and purport to have made safe abstractions actually did so.