It is alleged in court, officially, Facebook sought out NSO Group in October 2017 to purchase the right to use Pegasus capabilities for users of Onavo Protect.
Onavo Protect was a “free” VPN solution provided by Facebook. The catch was Facebook was analyzing web traffic to detect usage of other apps. This is not the main use case of Pegasus (post exploitation framework for iOS), as representatives wanted to monitor phones of users who had installed Onavo.
The need for Pegasus came from Facebook not having as much insight into user behavior via data collection on iOS as compared with Android. Thus, Facebook potentially wanted to use Pegasus to close the gap between the operating system data collection abilities.
Recently Facebook has been upset due to NSO Group releasing modules for customers which included a 0-click exploit against WhatsApp users.