Why has this question been closed as “opinion based”? What did I put in the question that is making it an opinion?
It does not to me look like you were asking for people's opinions. I imagine you consider this a matter of fact, not opinion. It is possible that the close voters consider it only a matter of opinion, not of fact. But I do not know this for certain.
At least two of the three close voters will have to have voted that way. They're the only ones who know why they voted that way.
But as written your question is nonetheless a little unclear and unresearched. It's unclear because there are dozens of such words but you only thought of two, and because asking why we don't spell just the same way that we spell gust is a deeply confusing question of itself.
So it feels like you are unaware of two thousand years of intervening history between classical antiquity and today's spelling. Or even the history of the letter J as in Gaius Julius Caesar — not to mention C as in Gaius, and yes, Latin also didn't have a G for the longest time, so C is the abbreviation for Gaius.
It's unresearched, or at least shows no research, so we don't know where to start. We don't know what you know or don't know, because you haven't shown your research.
In any event, that's way too much of an open-ended question for our format here to cover. Books are written about this.
So your question is still very hard for us here to answer in a satisfactory fashion.