Look at the photo below. As you can see the intake isn't attached to the fuselage. Why? Other examples include the F-16, F-22, and F/A-18 Hornet.
That's called a 'fuselage boundary layer diverter channel', or splitter plate.
The air near the fuselage or wings is slowed down (thereby losing energy). Those plates ensure the jet engines get free stream air, which improves the engine performance. This free stream air will be undisturbed, allowing a more uniform intake of air.
You can also find it on the Concorde.
The problem which this gap is solving has to do with boundary layer air as @ymb1 suggested but performance is not the only complication.
Boundary layer is not only slower, in some regimes of flight it can become highly turbulent compared to the air that is offset from the aircraft's surface and is freely ingested by the aircraft's intakes. Mixing the two makes the resulting flow unstable and thus combustion inefficient and even choked. At supersonic speeds these issues are even more severe.
Some designs go without the gap and use 'gauzing panels' which remove the boundary layer. Others - use hump-like structure on the fuselage of the aircraft right in front of the inlet to divert the boundary layer air away. This design was tested on the F-16 you mentioned, but is already a key feature on F-35.
See the related article.