Yeah, it was basically a stunt. The US could not have foreseen that the Japanese would make a war-altering blunder (Midway) in response to a scattering of bombs (most residents of Tokyo were unaware of the attack – talk about a pinprick!). It’s not like Nimitz said to himself, “If we drop a few bombs here and there, they’ll wreck their navy!”
But it was something we could do directly to the heart of their empire, not the fringe, very early on. And while it did risk the carriers to some degree, it wasn’t that big a risk. In those early days of the war, carriers could count on the vastness of the ocean and on acting unpredictably to hide pretty effectively until they got close to land-based planes. And indeed, it was at the fringe of the land-based air umbrella that Halsey launched his bombers and turned away. Japanese early-warning craft might have spotted him, and he didn’t want to give the land-based air any time to react and sink his carriers. So he acted to minimize the risk to the priceless carriers, even though that exposed the raid aircrews to greater risk (by extending their flight to the edge of their fuel range).
Lastly, although it wasn’t much, it was doing something with the carriers. Unused assets might as well be sunk.
This lesson was re-learned at Guadalcanal, where the American Marines had terrible difficulties with the Japanese navy running in reinforcements, and even bombarding the Marine positions with battleships and cruisers. The naval commander, Robert L. Ghormely, was unwilling to risk major fleet units in the confined waters off Guadalcanal, deterred by the threat of land-based air and aggressive Japanese surface forces. Finally he was sacked and replaced with Bill Halsey. Halsey immediately asked the Marine commander, Vandegrift, what he needed. Vandegrift essentially told him the Navy had to shoulder some of the risk, rather than sheltering itself at cost to the Marines. Halsey committed his carriers to action and within 8 days of taking command fought the Battle of the Santa Cruz Islands, losing Hornet and suffering major damage to Enterprise, but damaging both Japanese carriers in the action and inflicting crippling losses on Japan’s irreplaceable elite airmen.
Worse was to follow. In a series of confusing night surface actions, the US Navy lost numbers of cruisers and destroyers and even had a battleship shot up. Several of these actions were outright defeats for the Americans, and two admirals were killed closing with the enemy in the most Nelsonian style (Daniel Callaghan and Norman Scott) . The Japanese also suffered major losses in these fights. So many ships were sunk, the area acquired the nickname Ironbottom Sound.
Despite the mixed tactical results of the Navy’s intervention, the cumulative effect was to take the pressure off the Marines, who went on to win the Guadalcanal campaign, kicking off the island-hopping offensive that would eventually win the war.
Lesson: sometimes even the major fleet units have to be risked, even lost, for anything to be gained.