First of all, MySpace was and is a quick way of creating a personal homepage. As such, it's competitors are all the other ways of getting a webpage.
Second of all, it turns out that a lot of people value privacy (which is ironic). Facebook had (and has) much more in the way of options for privacy.
Third of all, facebook works because it is a portmanteau of different web apps: it is a messaging platform, microblogging, scheduling, and photo sharing website. These are the four most popular online social activities, and it enables all of them, in one place, with privacy controls.
Fourthly, it's structured format for user information gives it valuable information to sell.
Fifthly, it appeals to a different class of user: typically older, and typically from a wealthier, more educated background. That again makes it more valuable to advertisers.