A swimmer was killed in a shark attack in the waters outside Sydney, marking the first deadly shark attack in the area in six years.