Unavoidable?
No way.
Either it was:
Poor rigging selection (roll out)
Poor maintenance on the release cables or wiring (un-commanded opening)
or a non-proficient or five thumbed pilot, pushed wrong button or inadvertently bumped the button.
Either way, someone was incompetent and it was entirely avoidable.