The Northrop YF-17 Shrike, forerunner of the Navy/Marine F/A-18 Hornet, didn't really lose the 'flyoff' against the General Dynamics F-16. The flight charactaristics were very close. The competition was a 'push'. The F-16 was 'chosen' because the F-16 used an engine (the GE F-100) that was common with the F-15 Eagle which was already in production. The USAF wasn't ready to add another engine to the supply chain. Logistical concerns tipped the scale in favor of the F-16 Falcon.
Besides, this was the LWF (Lightweight Fighter) project. Single-engine makes a bit more sense from a readiness standpoint. 'Course the Navy takes the view that 2 engines increase survivability.
The YF-17 had more room for junk to be piled on...hence to be avoided...