Scholion to Sophocles’ Ajax, line 2:
“In Attic usage, peira means a trick or contrivance; for this reason, criminals on the sea are called peiratai (pirates).”
πεῖρα γὰρ ᾿Αττικῶς δόλος καὶ τέχνη, ὅθεν καὶ πειραταὶ
οἱ κατὰ θάλατταν κακοῦργοι.
Note: The earlier sense of peira was closer to “an attempt” or “experiment.”