You could view it as equivalent to impounding someone's car until they pay compensation, if the car had somehow caused damage while unattended (brakes failed and it rolled down a hill or something like that). I'd question what the men were doing that resulted in the donkey attack though; they could have been abusing it in which case it's their own fault they got injured, just as someone who breaks into a car, accidentally takes the break off and is injured when it rolls down a hill are responsible for their own injuries (in a sane world, at least).