You ask, how did scripture get the name Bible?
Etymology: Middle English Bible "the Bible," from early French Bible (same meaning), from Latin biblia (same meaning), from Greek biblia (plural) "books," derived from Byblos, ancient city in Phoenicia from which the Greeks imported papyrus. - Bible (Student Dictionary)
Here is a brief extract from a Wikipedia article on the origins of the English word, Bible:
The Bible (from Koine Greek τὰ βιβλία, tà biblía, "the books") is a collection of sacred texts or scriptures. The English word Bible is from the Latin biblia, from the same word in Medieval Latin and Late Latin and ultimately from Koinē Greek: τὰ βιβλία, translit. ta biblia "the books" (singular βιβλίον, biblion).
Medieval Latin biblia is short for biblia sacra "holy book", while biblia in Greek and Late Latin is neuter plural (gen. bibliorum). It gradually came to be regarded as a feminine singular noun (biblia, gen. bibliae) in medieval Latin, and so the word was loaned as a singular into the vernaculars of Western Europe. Latin biblia sacra "holy books" translates Greek τὰ βιβλία τὰ ἅγια tà biblía tà ágia, "the holy books".
The word βιβλίον itself had the literal meaning of "paper" or "scroll" and came to be used as the ordinary word for "book". It is the diminutive of βύβλος byblos, "Egyptian papyrus", possibly so called from the name of the Phoenician sea port Byblos (also known as Gebal) from whence Egyptian papyrus was exported to Greece. The Greek ta biblia (lit. "little papyrus books") was "an expression Hellenistic Jews used to describe their sacred books (the Septuagint). Christian use of the term can be traced to c. 223 CE. The biblical scholar F.F. Bruce notes that Chrysostom appears to be the first writer (in his Homilies on Matthew, delivered between 386 and 388) to use the Greek phrase ta biblia ("the books") to describe both the Old and New Testaments together.Bible (Wikipedia)
The phrase ‘biblia sacra’ (holy books) first appeared sometime in the Middle Ages. In English, one of the earliest—if not the earliest—uses of “The Holy Bible” appeared in 1611 on the cover of the Authorized Version, known in the U.S. as the King James Version.
I sincerely doubt there is any truth to the rumour that: “Byblos means "city of bastards" and it was deceptively put on the bible by some as mockery because Mary was with child without a human husband.” I do not know of any Christian denomination that would make such a claim.