How is panicking the same as dereferencing a null pointer, which is undefined behavior?
However, I would assume that the presence of an «unwrap» would have been caught in code review, whereas it’s much harder to be aware of which pointers can be null in Java/C++.
This is a false and dangerous misconception people seem to get wrong a lot of the time. There's no guarantee that's the case, especially when working in C where pointers are often subscripted.
It's the common behavior that a trap occurs but nothing dictates that's actually what will happen.