The simplest way to put it without going super into it is that animals like animals of the same species. Like first of all, if the pigs were really in mating season they would try to go after eachother first(they're literally in a pig pen). Secondly, there's a lot of instinctual factors that dissuade an animal from this, such as, smell, mating courtship, and biological preferences. Thirdly, in reality animals get frightened by loud noises from animals that they see as predators (such as humans) and they wouldn't go after her when she's screaming and running.
The story uses this more like a shock factor and I also had an audible gasp. Tbh I saw a spoiler last chapter about her punishment being horrible and this was not on my bingo card īŧ/TĐT)/
Is there someone that know about science can pigs do that