Its the classic "pirates code".
I answered it here: https://www.reddit.com/r/AskHistorians/comments/13khdz/wednesday_ama_im_eternalkerri_moderator_and/c74vtak?utm_medium=android_app&utm_source=share
https://www.reddit.com/r/AskHistorians/comments/gy52qc/is_it_true_that_pirate_ships_during_the_golden/ Check out the top answer to this thread. It gives a lot of details about the contracts.