No reason was given for the unexpected departure of the Navy’s top civilian official, coming as the sea service has imposed a blockade of Iranian ports.