I don’t think people in the asoiaf fandom fully grasp why anti-bastardry in feudalism functions as an actual form of oppression. And that said form of oppression does still exist in many parts of the world. For some reason, I’ve come across people not taking it seriously, or relegating it to a more minor form of bigotry.
Fundamentally, the hatred of bastards stems from patriarchy and misogyny. It stems from hatred and dismissal of mothers, in particular. The notion of a child being borne of wedlock is tantamount to a great sin committed against the heterosexual, patriarchal, structured body of the kingdom; that sin is borne by the mother and child alike. It’s why if the father does not marry the mother or claim the son, both the mother and son are either abandoned or punished for the “sin” they have committed.
GRRM doesn’t just showcase this via Jon’s storyline. He shows it in how worried Gilly is for her son, how Myrcella and Tommen are seen as monstrous just because they are bastards borne of incest (through no fault of their own), in how Robert’s various bastards suffer because he does not give them protection or a good upbringing, leading easily to Cersei killing them, in how Edric Storm is nearly sacrificed “for the greater good”, simply because “one bastard boy” should not be held against the realm’s “good”.
Moreover, bastards are hated in particular if a highborn man, or man of an ethnicity in power, has sex with a lowborn woman or a woman of an oppressed ethnicity. This is why bastards, who are already marginalized, face even more isolation if they are lowborn/common-born, disabled, or of an ethnicity that is marginalized. Policing birthing practices and women’s bodies is a way for the elite to stay in power, after all.
The hatred of bastards is part and parcel to upholding the patriarchal, ethnically homogenous, able-bodied kingdom or empire (in a time of feudalism) or the modern nation-state in our current time. Understanding this is crucial to understanding several of the conflicts and characters in ASOIAF.