Monster High dolls were originally produced with a small loop of elastic which attached the legs together at the hips. This elastic often snapped due to rough play, simple wear and tear or the old plastic pegs that the elastic was looped around broke.
This problem was resolved after, and including, Toralei's first release, when a new plastic peg system was introduced.
However, older dolls' legs are still falling off!
If you receive a faulty product there are often helpline numbers where you can ring the company and a representative will offer a solution. My personal experience of Mattel UK customer services is that it is somewhat lacking, and they generally say 'sorry, there's nothing we can do' unless the doll is in production right then and they may send out replacement shoes/accessories, so broken legs is a different story.
Instead of trying to sell the doll on, or even throw it away, try fixing it up!