Actually, some ships function as artillery. Many ships that have no unit capacity can bombard coastal cities (like the battleship, for instance). Just like siege units, if you park them next to a city, they will gradually decrease the city's defense. This only works on coastal cities, though.