It seems to me that it was Americans, start to finish, fighting for themselves that led to the Captain escaping and the pirates being killed, eventually, by the military. Captain Phillips first volunteered himself to the pirates to save his crew. Then, twice, he attempted to escape by jumping overboard. The second time was successful, probably because the Navy realized he might try it a second time and were prepared.
The fourth pirate was on the Bainbridge negotiating the ransom demands when Captain Phillips managed to escape.
It looks to me like the captain did what he had to do to stay alive.
I'm curious, but it's OK for them to keep the details secret.
sw
Looks like Phillips precipitated the action by jumping out of the boat again. Loitering Navy Seals saw this and removed the pirates. I don't think we can depend on other hostages to be as brave next time.