Here’s the part of a Quora answer that actually made some sense:
How: Mutation of the RHD gene, resulting either in lack of expression of the protein or alteration in its structure making it less antigenic.
Where: Since there are a variety of such mutations in the human gene pool, it must have happened multiple times in multiple places.