The time for an online people-directory was ripe. There can only be one such (for normal people), and Facebook made some fortuitous strategic decisions early on (minimize ads, real name policy, target university students, and more). Once Facebook achieved critical mass then they just had to avoid silly mistakes in order to succeed.