system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How did animals that fought alongside humans (horses, elephants...) not panic when seeing all those members of their species dying, while getting poked with spears and shot with arrows?

I always wondered. Because you would assume that horses just try to get the person off of it and run away. And how did something like the war elephant not just trample anyone to death? They are such smart animals and I'm sure they felt something by the sight of that. If I was a foot soldier I wouldn't feel so great if there was some giant, armored, living tank berzerking around... Even if they supposedly are on "my side".
gpt
They're intensely conditioned. Horses, for examples, are easily frightened animals. To condition them to a battlefield you'd (probably) do something like start them out easily. Make the loud noises they're expected to hear next to them so they get used to them. Place some dummies on the ground in the style of corpses and have it walk around them so they get used to that. And so on.

But animals still frequently panicked. Elephants in particular were (in)famous for how frequently they'd panic and turn around to trample their own army. Remember reading that part of the job of an elephant rider was to be prepared to execute it with something like a nail and hammer to the head in case it panicked. Don't know how true that was, but it sounds very plausible.