To remove what was holding a thing closed. Unlocking grants access that already existed behind the barrier.
Old English un- (reversal) prefixed to lock, from Old English loc (a bolt, bar, enclosure), named the removal of what had held a thing closed.
The removing of what was holding a thing closed, granting access to something that already existed behind the barrier all along.