The story I had heard was that the destroyer was prosecuting a depth-charge attack against a US sub, gave-up, and was racing back to assume its place in the destroyer screen of the Japanese carrier strike force.
You are correct. McClusky’s bombers were following the Arashi which was returning to Nagumo’s force after attacking the Nautilus which had unsuccessfully attacked the battleship Kirishima. The sub pretty much achieved nothing by itself, but made a major contribution to the battle just by being where it was and doing what it did. The fortunes of war.