No reason was given for the unexpected departure of the Navy’s top civilian official.