WhatsApp was not created by Facebook. It used to be an independent company which major selling point was offering free encrypted messaging to the masses, which was mostly relevant to non-US users as they're charged for SMS usage more directly (it doesn't come free and unlimited on most plans).
It was bought by Facebook in 2014 and by 2016 they implement end-to-end encryption. There's already various cases of courts around the world trying to compel WhatsApp to hand over messages but they didn't because they simply don't store the messages on their servers, and when the messages pass through their servers they're encrypted by design.