In J. K. Rowling’s Harry Potter series, the bad guys prefer ‘pureblood’ wizarding families to half-blood or Muggle born wizards. And that makes them bad and prejudiced, according to the book’s author. But the plain fact is, the Death Eaters were right. Pureblood wizarding families ARE better.
Wizarding ability is inherited through the genes, and there is no clue in the series that the essential wizarding genes behave differently from other genes. When a wizard marries a ‘witch,’ the offspring can inherit magic from both sides. When he marries a Muggle (non-magical person), the children can only get magic from the one parent.
It is possible for a wizard to be born from Muggle parents, but that is very rare. One may assume, though, that in half-blood marriages between wizard and Muggle, there are a lot of non-Magical children born.
Wizards don’t want to die out. It’s clear that if most or all wizards reject the ‘pureblood’ prejudice and marry Muggles freely, the number of wizard-gifted children born grows smaller and smaller, and the Wizarding world might well shrink.
The prejudice against Muggle-born wizards may have its basis in facts. Do Muggle-born wizards have as many wizarding genes as the average pureblood wizard? Probably not! They are lucky to have any wizarding gift at all! They are a needful addition to the possibly-shrinking wizarding world, but they are more likely to have squib children.
Of course, these days wizards can figure out which genes are connected to wizarding, and figure out who has which genes. A marriage to a Muggle who has some wizarding genes isn’t as bad as one to a Muggle with no wizarding genes. And a pair of pureblood wizards might have very different wizarding genes and not be able to pass on the traits well, while a different pair might be destined to produce strongly gifted children.