A product like Facebook simply requires a lot of people to build and maintain. Obviously you could create something that did a lot of similar stuff pretty quickly in Rails just with a couple of people, but there would be a phenomenal number of details that you'd miss out -- and it's those details that take up all the programmer time.
A recent example from my own experience -- we've built an online spreadsheet; it took us a month or so to put together something that calculates stuff. It's now taken another month just to get copy and paste working. Other seemingly-minor UI things will probably also take huge amounts of time.
And on top of all that, there's scalability. A site with 500 million users, all of whom need to see roughly the same view of your datastore, is incredibly hard to get right.
I think it's for two reasons: (1) enterprise "drag", and (2) a small start-up application doesn't nearly cover the scope of operations of a large company. By #1, I mean things like bureaucracy, largely mediocre performance from people, supporting crappy "enterprisey" internal systems like time tracking, etc. By #2, I mean all the thousands of little details that go into making a business really work: financials, performance metrics, monitoring systems, HR systems, and on and on and on.
Because they have investment $ to burn on lots of different projects. Small startups typically focus on one project and as task volume and diversity increases, more engineers (and types of engineers) are required to handle them. FB has come a long way since 2004. Why wouldn't they need lots and lots of engineers?
Btw, if you want to have an idea as to how many employees Facebook actually attempts to hire from overseas, see Here. These are based on official government filings. Salary info. and title variations are also available.
You can also find out more about the current facebook employee clime Here. Best way to answer your question is to look at job posting descriptions, find out what they're actually working on based on employee gossip, how software eng/coder positions are titled, and whether they are separated into different departments.
Because it takes lots of engineering to keep a site as large as Facebook up and running :-)
This response to Twitter's head count by Jane Huang gives you some idea of the kind of things that need doing.
Think about operations for example. Facebook has over 30,000 servers to manage. Think about the issues involved in supporting that many machines...