If we talk from a user prospective then it is very difficult to remember so many passwords. So at the end the user may forget many password. But if we talk about facebook or Google, we are connected on daily basis so we do remember password easily.
If we talk about developer’s prospective, if we create a registration form where user can register with his email id and phone number. After registration you need to verify email id and phone number of user so avoid spamming. This increases one task of developer. Apart from this you need to give forget password button whenever user forget his password. But in facebook or google login you just need the api that will authenticate the user with their email id and password and return auth code. If that auth code is there in our database then that means this is our registered user . Simple.
At the end this is beneficial for developer as well as user. And also one more major thing, this decreases spamming at some level. Generally we have multiple email id and multiple phone numbers but not facebook account.