Where do "weird" fetishes come from?

I'm not only talking about the bizarre stuff like piss kinks or bdsm, I am also talking about stuff like being attracted to feet, wanting to do anal, even degradation.

How does it even happen?