What's "ethical" is literally a political and philosophical question. There is no objective answer to that.
On the other hand there is absolutely universal human sense of fairness.
You and I have access to the same LLMs which have been trained on the corpus of scientific research, and they'll tell you the same thing I am. Take it up with [gestures broadly at science].
It's just a statistical anomaly where the collective thought was stuck in a local minima, where they thought that the sacrifices had a correlative/causative effect on good harvest/luck/fertility/rain/etc. The collective common good for a sacrifice of someone was seen as a good deal with the limited information they had available at that time.