He wanted to exchange Bonney for a warship. Since Akainu came, that plan was obviously failing, so fighting was pointless. He could handle Akainu, but he risks losing some of his crew, destroying the warship, and there is nothing stopping the Marines from calling for more backup