Rules exist, but most are never taught and instead only learned through exposure. It's why "ghoti" is a trick - you have to break several rules of English pronunciation to get "fish" out of that.
Here's a page where someone tried to reconstruct as many of those rules as possible: https://www.zompist.com/spell.html - obviously it can't eliminate all exceptions but it does surprisingly well.
Rules 6-8 are relevant to one of your examples, including the explanation afterwards.
The complexity of these rules, and the number of exceptions that you need to learn notwithstanding the rules, can be roughly estimated for any given language by training a language model on word <-> IPA correspondence for that language (using a subset of the vocabulary as a training set), and then seeing how well it can predict the remaining words. You can run it in either direction, too, to separately measure the difficulty of reading (word -> IPA) and writing (IPA -> word) that language.
This was actually done for a number of languages including English:
You can see how languages with true phonemic spellings tend to be in the >90% range on both reading and writing, with Esperanto at 99%. Spanish and German are in 60-80% range. English is dismal at ~30% for both, though, with only French and Chinese being harder to write, and all other languages tested being easier to read.
I couldn't help to look and see if the company behind commercials that are burned into my brain from 40 years ago are still a thing, and lo, Hooked on Phonics is still going strong!
This page[1] walks through the basics of phonemic awareness that children need to learn via exposure & repetition in order to learn to apply that aural learning to reading.
It makes me wonder if a program like this, aimed at English-speaking children, might help those adults learning to speak & read English if they could put up with being addressed as if they were a child.
Here's a page where someone tried to reconstruct as many of those rules as possible: https://www.zompist.com/spell.html - obviously it can't eliminate all exceptions but it does surprisingly well.
Rules 6-8 are relevant to one of your examples, including the explanation afterwards.