Facebook noticed that messaging is one of the new trends. This is one reason it created a separate app for its messages. Because Whatsapp is a dominant player in messaging, it made a lot of sense that Facebook acquires it.
Because Whatsapp is a faster way to send messages, so many people started using it instead of using Facebook inbox. This is, of course, a direct threat to Facebook and this is one of the main reasons they decided to acquire Whatsapp.
Right before its acquisition, Whatsapp had 450 million users. Mark Zuckerberg expected this number to reach 1 billion easily and this made Whatsapp a more attractive acquisition target.
Some of the popular messaging apps such as 'Line' started offering other services, in addition to chatting. Because the experiment was very successful, Facebook's management started to believe that messengers will turn into platforms providing other services.
So many people started sharing some of their photos with friends on WhatsApp instead of posting them on Facebook. This was seen as a direct threat by Facebook and so it had to acquire it (See also why is Instagram popular).
So many successful tech companies disappear as a result of technology disruption. Because Facebook's management was too afraid of disruption by other apps, especially the popular ones, they had to acquire Whatsapp.
Because Facebook's main mission is to connect people, it had to bid for the competitor that started doing that perfectly. Facebook also attempted to buy Snapchat but didn't succeed (See also why people like snap chat).
WhatsApp was already popular in some important developing markets when it was acquired. Facebook saw this as an opportunity to enter those markets, especially with the fact that mobile growth is expected to boom in the coming years.
New generations don't think that Facebook is a cool social network. Some of them call it the social network for grown ups and so they started moving to other apps that allow them to connect to people from the same age group (See also how Generation Z think).
Because Facebook believes it's worth more. A company doesn't pay a large amount of money for an acquisition unless it believes it will gain more than that amount. The rewards don't have to be financial, but they could be as simple as protecting Facebook from extinction.
If Whatsapp reaches 1 billion users, and Facebook charges just 5 dollars per year for it, it can gain more than $19 billion in just 4 years.