I can try to answer this from an American English perspective. It’s likely that the reasons are the same for British English since they are very similar accents.
Below are the phonetic descriptions Merriam-Webster gives for ‘exist’ and ‘maximum’. This is how most native speakers say these words.
You could say ‘exist’ like this \ek sist\ or \ik sist\ rather than \ig zist\ and still be understood because K and G are fundamentally the same sound. They are made in the same manner, and in the same location. They have one difference: G is ‘voiced’-it vibrates the vocal folds, and K is not—no vibration in the throat. And S and Z are essentially the same in manner and location also. The one difference: S is not voiced, while Z is voiced. If for some reason you weren’t able to make the hissing sound of the S while saying ‘maximum’, people would still understand you.
So the first point I’m trying to make is that K and G are very similar, and S and Z are very similar also. Substituting one for the other sometimes happens.
Are you still with me? Here’s the next piece of the puzzle.
American English has a default setting that is pro-voicing. If we can substitute a voiced G or Z for a voiceless sound like K or S, we will. You’ve probably learned about schwa, right? Just like Americans relax vowels into schwa, we also relax consonants into a voiced state. Here’s a YT video about that:
(This isn’t necessarily true for British English speakers—it seems to be their default setting is to retain voiceless sounds like S and K.)
Finally, we relax consonants into voiced state in unstressed syllables, in just the same way we relax unstressed syllable vowels into schwas. Everything except the stressed syllable can and will be relaxed, when possible, by Americans.
So, the X in ‘exist’ is relaxed to G+Z because that first syllable is unstressed. And the X in ‘maximum’ is kept voiceless, K+S, because it’s part of the stressed syllable.
Hope that clears it up! Let me know if it doesn’t (although I’m not sure I’ll explain it any better the next time! : )