My reasoning is that coastal defenses under an army make more sense if you think your navy will be brushed aside or destroyed, and thus you link your coastal defenses with the army to smooth command, control, and communications with reserves of land forces in the interior who are expected to take the brunt of the fighting. This can be extended as technology develops with aircraft for scouting and air defense and a close working relationship with a coast guard in less intense areas in wartime to give the land forces both coastal and interior maximum warning and support. This makes sense when the USN can't do much about, say, the Royal Navy landing British Army forces in the US, as it would smoothly transition into the US Army confronting, or at least slowing or harrying British land forces.
But my understanding is that the big boom in US coastal defenses occurs from the late 19th century on through the World Wars, at which point diplomatic relations began to improve enough and the US Navy was a substantial enough force to prohibit such an invasion. Instead, it seems like having coastal artillery, land-based scout aircraft, harbor defenses, etc. all feeding information to and working with the Navy would've given the fleet valuable intelligence and opportunities to catch enemy naval or marine forces that stray too close to the coast, after or ideally while they've been damaged, exhausted, or expended munitions fighting the coastal forces. Perhaps even a chance to conduct small-scale amphibious landings to counter enemy amphibious raids, which would fit more with the Marines under the Navy than the more large-scale emphasis of the Army.
It also seems like a better technical fit for the Navy, who have vested interests in fire control against moving targets (i.e. ships rather than land units), artillery capable of reaching out to and knocking warships reliably, knowing how to navigate sea minefields and strike at naval installations (and the converse, what makes such difficult), good ways to take or defend ports, which locations would be the best landing or observation or other points of interest for a naval force, and so on. And if and when personnel and budget reductions cut both services to the bone, it seems like a navy could regrow it's coastal defenses' expertise and equipment from its core fleet arm rather more easily than an army could, say, rebuild an effective coastal artillery arm from its field artillery corps.
And even though the US Army Corps of Engineers took the lead in constructing coastal defenses when the US and its military was smaller, the expansion of the military and US ambitions and budget for it later on seems like it could've supported a body of USN engineers who could've taken over these coastal defense responsibilities.
Is the US much of an outlier in making coastal defense the responsibility of its army, even as it gained a substantial navy, or was this arrangement more common than the reverse?