It's known as justice IF the pirate has been tried in court prior to execution, otherwise it's generally referred to as 'state sanctioned murder' to execute without trial.
Just being picky, like, but you must trust politicians a damn sight more than I do if you are willing to let them sanction execution without trial.