It is part timing, part doctrine and part combat experience.
A ship, even a destroyer, is a large target compared to a bunker, or strong point or even an artillery battery. A ship is also a high value target. Again, a destroyer takes hundreds of men between 1 to two years (at best) to build
NOT including armament and engines/boilers, other supplied parts. larger ships obviously require even more investment. To the Navy dive bombers looked like a good way to get hits on maneuvering ships using small numbers of planes. There was only so much payload you were going to get off the deck using 800-1000hp engines.
950hp engine and in service on US carriers in 1939 and lasted until the spring of 1942 on one carrier.
Fighter using the same engine. and it lasted until well into 1941 on some carriers.
If the dive bombers couldn't sink big ships (500lb bomb?) they could damage them and make it easier for the torpedo planes(theory/doctrine).
Most armies had absolute crap for AA defense in the 1930s so most anything
looked good as an attack plane.
The US Army then got involved with two/three campaigns after Pearl Harbor that changed their outlook. In South East Asia and in in New Guinea the ranges from available airbases to target areas were a stretch for single engined planes or at least the single engine ones they had available. North Africa had shorter ranges but the AA defenses of some armies of 1942 were an order of magnitude better than the AA defenses of the armies of 1938. Long/slow (comparatively) diving attacks against low value targets defended by 20mm and 37mm automatic guns didn't seem like a good option.
Navy dive bombers got bigger and faster, mono-planes and 1100-1200hp engines and then 1700-1900hp engines leading 2000lb loads. While the army decided that if they were going to field squadrons of planes thousands of miles from the US with all the involved ground support personnel using longer ranged twin engine planes in some theaters made more sense and using fighter bombers for close support (with shallower, faster attack profiles) also made more sense than specialized single engine attack planes. The use of 12-1300hp engines in later P-40s helped as did construction battalions that could rapidly build adequate sized air fields. A little appreciated component of airpower. A few hundred (or few thousand) more feet of runway can do wonders for the ability of a small winged fighter to get a large bomb load of the ground.
Martson matting " A runway two hundred feet wide and 5000 feet (1500 m) long could be created within two days by a small team of engineers." This may over state things a bit but US forces could rapidly build large runways with a better surface than packed earth (although earth/sand/coral was often placed on top of the steel planks).
Papua New Guinea Sept 1942.
Yes P-47s (2000HP + )could carry carry large bomb loads for a fighter but they needed a runway around 3000ft long to get air borne let alone clear a 50ft obstacle.
There are a lot of factors that enter into aircraft use and with aircraft taking 3-4 years to develop, manufacture and deploy the conditions that the initial requirement/design was supposed to address could have changed radically.