An executive key was a tool to get access to almost everything.

In 2364, Ralph Offenhouse asked Captain Jean-Luc Picard why they used no executive key aboard the USS Enterprise-D to lock the communications panel in the guest quarters if its use was not permitted. Picard explained Offenhouse that this was not necessary as everyone aboard a starship generally had a measure of self-discipline. (TNG: "The Neutral Zone")