The President may detail officers of the Navy as superintendents or instructors of institutions receiving benefits under chapter
515 of title
46 when in his opinion it can be done without detriment to the naval service. Officers so detailed shall be recalled from an institution if it is discontinued or if the good of the naval service requires.