A title can be used to identify the work, to put it in context, to convey a minimal summary of its contents, and to pique the reader's curiosity.
They were referred to by their incipit: Be-reshit, "In the beginning" (Genesis), Va-yikra, "And He [God] called" (Leviticus).
The Iliad is the story of Ilion (Troy), the Trojan War; the Odysseia (Odyssey) that of Odysseus (Ulysses).
When books take the form of a scroll or roll, as in the case of the Torah or the Five Megillot, it is impractical to single out an initial page.
To make the content of the book easy to ascertain, there came the custom of printing on the top page a title, a few words in larger letters than the body, and thus readable from a greater distance.
Gradually the concept took hold—Homer is a complicated case—but authorship of books, all of which were —or were believed to be— non-fiction, was not the same as, since the Western Renaissance, writing a novel.
The concept of intellectual property did not exist; copying another person's work was once praiseworthy.
The AP Stylebook recommends that book titles be written in quotation marks.