Facebook didn't guess that users wanted to share photos. It learned it, Mark Zuckerberg explained in his talk at Y Combinator Startup School. "We really listened to what our users wanted, both qualitatively listening to the words they say, and quantitatively looking at behavior that they take." Users didn't necessarily say they wanted photos, but were uploading new profile pics every day.
Zuck's Advice To Startups: Explore Before You Commit, Listen, Build Something Fundamental, Don't Copy