Because it costs so much to keep one in paint and powder.
Source, in full
when asked why a ship is always referred to as "she", to Society of Sponsors of the United States Navy, Washington, D.C. (February 13, 1940); reported in Associated Press dispatch, The New York Times (February 15, 1940), p. 39.