Just because it was Facebook doesn't mean the initial code was very good. Twitter's suffering a lot of technical debt from some bad initial decisions in the codebase.
Those weren't bad decisions, they were technical debt - a very useful thing in early stage startups.