The Tomcat was built to replace the Phantom. The Hornet was built to replace the Skyhawk and Corsair II. The A-12 was designed to replace the Intruder. That was the plan, but obviously it didn't work out as planned. When the A-12 was cancelled, the Hornet was seen to be sufficient enough of a light bomber to fill for the A-6. As the Tomcat grew to be seen as cost prohibitive on the maintenance side and the older Hornets were running out of life, the F/A-18 E/F was born to fill the gap until the F-35 was available. The collapse of the A-12 had a major impact on the requirement for a "gap" aircraft in the Navy. The Navy sold it to congress as just another flavor of Hornet with a good pitch and it is actually one of the better procument stories out there, despite canted pylons.
The Hornet did begin life as the YF-17, but went through significant changes to make it a carrier based aircraft. As other posts have indicated, the best way to design a multi-service aircraft is the make if for the Navy first and then other people can use it too because they still work on land. You just don't get STOVL that way. But that's what Helos are for!
Fun fact, the Reagan only has three wires BECAUSE of the A-12 design.