No, SoundCloud or YouTube won't sell your music. If they started doing things like that they would have law suits up to their eyeballs, no one would trust them with anything, and they'd be out of business lickity split.
HOWEVER, if you post a song to any site on the internet where anyone can listen to it, there is always going to be the chance someone will pick up the melody/chord structure/rhythm and use it in a composition themselves.
Your only recourse is to keep an original, time stamped copy to prove the work is yours, so you can ask for your share of the earnings from any future songs that use your creation or part thereof.
If you believe you've had works stolen, or used without your permission, get yourself a good lawyer and ask for your share of the profits.
The only other thing that can happen is someone filches your song and makes a really bad song from it so that you can't use that music again without the world listening and thinking "oh no, there's that song again". If that happens, you may have a case as well, but unless the other party has lots of money I don't like your chances of suing them for anything other than the short off their back or the satisfaction of taking them down.
Moral of this story is: don't post anything to the internet you don't want spread around the entire world. Use an encrypted, or private, sharing service if you need to send songs to someone.
The advantage of course is you have a method of getting your songs to an audience that may not have heard those works in the first place. It's a double edged sword and it's the clever in this world that learn to use such things as the internet to their advantage.