Question: After killing Barbossa in the cave, why would Jack surrender (i.e. go with Will and Elizabeth) knowing that he was going to be hanged anyway? Wasn't there any escape for him?
L0gical
Chosen answer: At that point he already had hope that his crew and others would rescue him and he would be able to escape from custody. Which he did.
Answer: Actually, Jack had hoped the Black Pearl and his crew would be waiting for him outside the cave. When he saw it was gone, there really was no way off the Isla de Muerta except to go with Will and Elizabeth back to the Dauntless.