Have you guys ever wondered how words’ spelling are constructed?

From what I can fork out off my brain at this very moment is that spelling is there for us to distinguish words when we’re writing. It’s also there as a guide to how to pronounce the word. Okay, that’s fine, but what if the spelling already satisfies those two objectives but there are still alternatives to it, why does that one particular spelling is selected rather than the other? Alright, to explain myself more clearly (and you probably should say: “yea, thanks”) take the word ‘first’. Why is it not spelled ‘furst’? It is distinguished from other words, and still sounds the same when pronounced, so it serves those two purposes. Is there any particular reason then why it is spelled ‘first’ instead of ‘furst’? Or is it just some random guy randomly comes up with a random combination of letters and so randomly, the word popped out spelled with an ‘i’ rather than ‘u’? Is there any particular reason to this choice? Who was the person tht invented that word’s spelling anyway? Did he has some kind of authority or a higher degree of cleverness that allowed him to come u with that spelling? And the same applies to millions of words out there. How did their spelling formed?

Another example would be ‘hurt’. It’s perfectly okay if it is spelled as ‘hirt’. So what is the reason behind this? I’m curious.

But anyway, it’s nothing important. Just some random thought that randomly popped into my mind and so I just randomly picked this moment to randomly write this post.