As I mentioned several months ago, I didn't realize my phone number was on Facebook since my (now ex) wife had set it up for me. As soon as I deleted my number, a majority of the spam calls I was getting stopped. A few still pop up, but what I get now in a month is less than what I used to get daily.
I guess it could happen with putting your number anywhere on the web. Where have you put your number that you thought was harmless?