Your switch statement will be evaluated when it is encounter. Unless you are pressing a key on the keypad when the Arduino resets, key will be NO_KEY, for which you have no case, so the switch statement ends, and so does setup().
You could use a while statement, to loop while key == NO_KEY, with the switch statement in the body of the while statement.