How come he called it a Sandwich Island?

Captain Cook named the Hawaiian Islands in honor of the fourth Earl of Sandwich who was the First Lord of the Admiralty at the time.