Transported in the hold of a ship, even a ninja would not think that will fall into captivity. They were captured by pirates and now they want to deal with the daredevils. You can not really tell what was done to release. It is possible that the ninja did make an attempt to sabotage and give a fitting rebuff. In this way they will save their lives, and freed prisoners.