If you look throughout the Bible, God calls His people His children. And Jesus calls God His and our God, Father. Consider the Lord's prayer... "Our Father Who art in Heaven..."
We didn't do this any more than a zygote brings itself into being. It was God's plan to have children.
But who wrote the Bible? God himself?
Or he can understand the language we speak?
Bible and any other religious books were written by the people and also some of them were modified in the later years so these all are create for good cause not to trust them blindly.
This whole idea is very complex. But simply and pointedly stated, God works in all of us. He know everything about us. He knows that if He wants to let us live in freedom, He is going to have to let us act in freedom, at least somewhat.
Some of us are spiritually strong, and some of us are spiritually weak. Most of the spiritually strong, resist God. Many of the spiritually weak don't have much strength to resist Him spiritually.
Some of the weak ones are so weak spiritually - they might be strong physically - that they can't resist God's gentle talking to them. Some of these become His prophets, who write down the words that He tells them to write... spiritual talk.
The way to prove that they are hearing God and writing what He says - rather than just making something up, or listening to spirits of demons - is to check their prophesies. If the things that they foretell happen every time they foretell in God's name, they are prophets of God, writing the words of God.
God made the nation of Israel to be His nation above all nations, for His own reasons. The leaders accepted Old Testament books most of the time, based on the fact that the things foretold by the writers came to be. Nobody else in the world could do it this well. So the words of these prophets actually were the words of God.
This is why there are a billion and a half people in the world who are Christians. God's Word makes an impact on everybody who hears or reads it. But... some people are still so spiritually strong, that they can reject the Word of God for themselves. Others haven't heard or read the Bible, so they simply use natural rejection. Once in a while a little of the Word of God trickles into a spiritually weak person, without reading or hearing the Bible... and this person goes out and finds a Bible and starts to read.