The fact that the MHC regions is so diverse is just another layer of security which prevents major biases within the population in the presentation of chopped up bits of foreign and self antigens. However if we all had the same MHC, the function of the adaptive immune system would remain intact. Plus, we would be able to transplant organs between people much more easily.
The basis for the existence of these varied adaptive immune receptors which perform the recognition of self vs non-self is under investigation and you might want to read up on the latest research before jumping to conclusions: https://europepmc.org/article/pmc/6084782
If I remember correctly though, one of the major hypotheses is that an ancestor of the HIV or similar virus or transposon integrated itself within the gametes of some jawed fish without killing it, resulting in the ability to generate variation in immune receptors. https://pubmed.ncbi.nlm.nih.gov/7584143/
Oh, and there is not just one way to have an adaptive immune system, as even jawless fish have a way of rearranging their receptors to generate diversity: https://pubmed.ncbi.nlm.nih.gov/15241406/ https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3805090/
In sum, the only GOD we have evidence for around in the Generation of Diversity. https://www.nature.com/articles/430157a