The US counterattack against the Japanese was necessary to stop them from taking over more of the Pacific and to push them out of the islands they had already colonized. The particular strategy itself was necessary because of the locations the Japanese were targeting in order to secure for themselves strongholds over the entire Pacific.
The Japanese were intent on taking Midway island (named so because it was almost literally "midway" between the US and Japan) and Port Moresby in the South Pacific just north of Australia. They wanted the former because it would help them to close in on the US. According to the US Fish and Wildlife Service:
With Midway deemed second only to Pearl Harbor, Oahu in importance to protecting the West Coast, airstrips, gun emplacements and a seaplane base quickly materialized on the tiny atoll. But the Navy created a long-term infrastructure as well, creating Naval Air Station Midway" (1).
If they did take Midway Island, it would likely have been a severe blow to the US presence in the Pacific and its ability to defend itself on the west, since Pearl Harbor was already destroyed too.
The Japanese sought Port Moresby so that way they could surround Australia, which they planned to either invade or to simply isolate. Wikipedia cites a swiss scholar, Henry P. Frei, to point out,
The generals of the Army General Staff, and the Prime Minister of Japan, General Hideki Tojo, did not see a need to commit massive troop resources to the conquest of Australia, with the massive logistical problems that would produce. The generals were confident that Australia could be bullied into surrender to Japan by isolating it completely from the United States and by applying intense psychological pressure. (2)
With Australia out of the way, Japan would be able to exert more dominance over the Pacific and pressure on the western coasts of the US.
For these reasons, the US had to pursue this two-pronged approach towards confronting the Japanese from both the North and from the South. You might consider too that the Japanese had already invaded some of the Aleutian Islands, which are the chain of islands that tail out of Alaska into the north of the Pacific. By invading these islands they technically already set foot on American soil.
Many of the islands in the Pacific that were colonized by the Japanese were just too small for the US to deem it necessary to land troops on the ground. I actually lived in one of those islands for an entire year, and can tell you from personal experience that you can literally walk from one end to the other within an hour or so. For precisely that reason it was not deemed necessary for the US to actually bring troops and tanks to all of these islands, especially the ones called the "Caroline Islands" otherwise known loosely as Micronesia. The US did land on some islands that were larger, but for the smaller ones it was sufficient to simply drop bombs or pursue continuous air raids like Operation Hailstone.
The islands are so small and so distant that once the Japanese were defeated on them, the US used them to store and refuel their planes and ships. Even today, the only airlines that fly around these tiny islands that make up what is now called the Federated States of Micronesia is dubbed an "island hopper" because it is as though the airplane is literally hopping from one island to another. That is really the only way that people can get to these landmasses since they are so remotely isolated in the middle of the Pacific.
Let me know if you have any questions or would like a tutoring session for further assistance.
1) US Fish and Wildlife Services https://www.fws.gov/refuge/Midway_Atoll/preserving_the_past/Preparing_for_War.html
2) Wikipedia - Proposed Japanese Invasion of Australia during World War II