I think there are four sources.
One is that swamps are treacherous. It is, at least in stories, fairly common that a piece of solid-looking land turns out to be anything but, and instead turns out to be some kind of mud or quicksand that sucks you to your grave (yes, I know quicksand doesn't...