In many cases, the spelling of English words has to do with where they were taken from, and when they entered the language. For instance, with "book" and "boot", "book" entered the English language from the proto-German, a very long time ago. If it had come from a Latin-based language, like most of western Europe, it would have had "lib-" as a root ("libro" is Spanish for book, "libre" is French, they are both drawn from the Latin "libellus"; "library" entered the English language much later and draws from this same root). "Boot" comes from the Old French "bote". Their meanings are unrelated because their sources are unrelated. It is common, but not universal, that English words from the same sources that sound similar will have similar roots and related meanings.
This is an example of false cognates within a single language.
If this topic interests you, I highly recommend spending some time perusing etymonline.com