But there was a time when books were luxuries, and each copy was treated as a work of art. Bookbinders (who were sometimes publishers, but not always) would clad a text in an expensively-tooled leather cover and, sometimes, hire an artist to decorate the edge of book with a painting.
As you can see in the following videos, a fore-edge painting is not visible when a book is closed; instead the book looks like it has gilt, or gold-painted edges.
It is only when the book is opened that you can see the artwork.
According to the Encyclopedia Britannica, this type of artwork was added to books from about 1650 to the late 19th century, when the style began to wane in popularity (perhaps as became more of a utility than a luxury item).