A couple of factors played into them actually not causing the damage that they initially thought it would.
They never sent the third wave of attacks. This left many of the support buildings and land-based targets undamaged, and still able to service/recover much of the Pacific fleet in a more timely manner.
The carrier groups were out to sea, and the Japanese had no idea where they were.
There were a ton of risks associated with the Japanese sending a third wave, and it was a legitimate decision for them to withdraw their fleet, but if they hadn't withdrawn, and had sent the third wave, the Pacific fleet wouldn't have been able to resume any kind of war-time operations for at least a year, and the entire outlook of the war might have changed.
But the risk of the carrier groups returning to attack their fleet when they were ill-prepared to defend themselves, the risk of their planes having to land at night after a third wave(no real nighttime carrier-based operations had been done to that point, with the exception of the British RN, I believe.), the US was no longer caught by surprise, so their ability to defend had improved, as well as a possibility that the Japanese fleet was in range of US land-based bombers at that point, and their fuel was running too low to risk staying longer.
Instead, the US was able to raise, repair, salvage, etc. a lot of what was damaged that day in a much smaller window of time, and get it back in the fight.