If the idea is to realize which practice in ancient greek life is accepted from reading this excerpt, the answer would be sacrifice.
The only way for the Ethiopians to stay alive is to offer Andromeda as a gift to the monster. Only by doing that, they could "be freed from the pest".