As an explorer and astronomer, James Cook traveled all over the world for many reasons. The primary purpose of his first expedition, which was to Tahiti, was to observe the planet Venus as a small black dot while it passed between the Earth and the sun.
Cook wanted to observe Venus in order to help him calculate the distance between the sun and the Earth. On his first expedition, Cook was also searching for a large continent in the South Pacific Ocean. While such a continent does not exist, on that voyage Cook mapped the two major islands that make up New Zealand, which is why the strait between the two islands is called the Cook Strait.