It's even in the movie. Zuckerberg was inspired by Hot or Not and used his friend's chess ranking algo for Facemash (comparing college girls). And that inspired him in part for making the Facebook.