The sounds moved; the spelling stayed
Between roughly 1400 and 1700, English pronunciation went through the Great Vowel Shift: the long vowels of the language systematically changed their sounds. Words were spelled one way and, over generations, came to be pronounced another.
Printing arrived in England in the late 1400s, right in the middle of the shift. Printers fixed spellings in books while pronunciation was still moving, freezing a moving target. Much of English spelling is a photograph taken mid-jump.
Layers of borrowed words
English has absorbed vocabulary from Norse, French, Latin, Greek, and many other languages, and it often kept the donor language's spelling habits. That is why similar sounds are written so many different ways across different word families.
Some odd spellings were deliberate edits. Scribes and scholars added letters to show off Latin roots — the 'b' in debt was inserted to point back to the Latin debitum, even though nobody had ever pronounced it in English. The 's' in island was added by a similar mistake about its origins.
Chaos with patterns inside
English spelling is irregular, but it is not random. It often preserves information about a word's family and meaning — the silent letter in sign reappears, pronounced, in signal — which can help readers even when it torments spellers.
Reformers have tried to simplify it for centuries and mostly failed, because hundreds of millions of readers, books, and now databases are invested in the current system. The strangeness is, by now, load-bearing.

