Odysseus doesn't necessarily want to visit the land of the cyclops or Polyphemus (the specific cyclops in whose cave he ended up trapped). However, he does stop to explore because he sees a fertile and quiet island. Travelling on a ship requires a lot of food and water in order to keep the crew alive and healthy, and since Odyessus' twelve ships are full of his friends and fellow soldiers, he certainly won't want to keep them on starvation provisions that slaves were often subjected to at the time. But if Odyesseus wants to keep the men fed and have fresh water available, he has to stop, find streams to refill water reservoirs and find fresh meat and grains.
It was this urge to raid the islands for food that led Odysseus and his men to raid the island of the Ciconian, the first place the stopped after leaving Troy. So, clearly Odyessus didn't mean to visit the cyclops. He wanted to grab some food, grab some water, and leave. However, the fact that he got caught by a one-eyed giant was one of those pieces of bad luck Odysseus seemed to run into a lot.