these thoughts might not be sound
"ok but why did JKR jump into the TERF pit?"
shes a white ciswoman with money and aspirations of breaching into the English upperclass, where the common strain of white supremacy among women is TERFism - an ideology that allows white ciswomen to appease white cismen by letting them lash out at gender nonconforming people, primarily trans women, which are painted as the ultimate threat to their status.
the white ciswoman's bargaining chip in white supremacy is the potential to bear white children, which makes her "valuable" "as a woman" in the eyes of the white cis man - the trans woman is a "threat" to this constructed identity because she by default is categorically unable to bear any children, yet lays claim to identity as a woman and as the cis woman's equal (and in the twisted logic of this ideology, "removes" a potential sire for white children "from the breeding pool").
the TERF is like the racist and the eugenicist a tool deployed to "defend" the goal of this doomsday ideology, by removing "threats" to its (self-perceived as) homogenous in-group that would otherwise by virtue of humans not naturally being predisposed to bigotry of this intensity since we do not by nature treat our own species as livestock to be bred and optimized (for what?) in the way of animal husbandry, be allowed into the group, and bring their (perceived as) "outside" traits and ways of living into it.
white supremacy treats humans including itself like that, as livestock to be bred towards a goal but instead of factual material improvement (breed cows to give more milk to have more of it to drink, breed chicken to lay more eggs to have more of them to eat, breed dogs to be less feral and more obedient to have more reliable hunting companions, breed the wild mustard seed into a variety of vegetable crops to eat them for nutrition, breed apple trees to bear more fruit to have more of them to eat etc etc.) its goal is to make worse the situation for people not among the "in-group" in order to achieve relative material improvement, making things "better" for the in-group by making everything worse for the ones outside of it. this is framed as "purifying" the "white race" of course, in its own language. "purifying" the class of "women" by removing those from it that do not fit the unnatural mold of the white supremacist ideological breeding goal.
making "better" the situation of the white abled neurotypical ciswoman by making worse the situation for the non-white woman (specifically Black women, who have spoken about this more eloquently than i can), the disabled woman, the neurodivergent woman, and of course the trans woman - the "pretender to the status" of a woman. she is an antithesis to the ideology and someone who violates it not just by aspiration ("i am a woman" with an implicit "as much and as little as you are") but by rejection ("your assignment at birth does not define me or my role"), which targets another point in the system of white supremacy - the status of the white cis man. his status (so he be abled, neurotypical, and willing to "sire white children") sits at the top of his self-fashioned unnatural ecosystem. being born into it, his ideology dictates, is good. his position of power by the grace of his assignment at birth is what the whole system is meant to produce!
the trans woman, being ostensibly "born" into this "status" however turns out to be a changeling: she, for no apparent gain of status or power (since "becoming" a woman from "being" a man is a net loss in the logic of this system) "chooses" to reject this status. this upsets the dogmas of the ideology. if its actors can simply do this then the system's logic is disrupted. such an actor within the system must be purged to stabilize the power balance.
this is where the TERF is deployed, the white ciswoman anxious to lose her position near the top of the artificially constructed chain of power. she is allowed the delusion that really who she is fighting against aren't necessarily "people", but "deviants", "toxic presences" in the "ethnic body" (it may not be phrased like that by them, but the underlying logic is still there) that the white cisman wants out of his constructed system.
she can gain materially (because the white cisman rewards her for it, directly or indirectly as stated before) by attacking this "deviant".
which is how it's pretty obvious why JKR, who has aspirations of "moving up", of "gaining materially" is a TERF.