When you install any app on your phone, it asks for some permissions. It asks for permission to access contacts, messages. It asks for permission to view photos, videos. The app will not be installed if you do not click allow for all of them. So we knowingly or unknowingly click the allow option for everything. This is where all our personal data goes into the hands of others.
Some settings are turned on by default when you buy a mobile. The mobile company you bought will set some defaults like this. While many such options do us good, some options are turned on in such a way that our entire data can be accessed.