It’s not that you NEED RAII (or any other language abstraction), it’s that this case would have been avoided with that usage.
Clearly, the current state of things was not enough.