The surfaces are not perfectly flat. If they were they'd shine like a mirror with a completely undistorted reflection (what you do when grinding telescope mirrors and camera lenses - it is expensive and hard to get right).
So when you mate the two together, there are small microscopic air gaps. Metal on metal contact is ideal. Thermal paste is about 100x worse at transferring heat than metal on metal (which is why the metal pastes perform better). But air is about 100x worse at transferring heat than thermal paste. So thermal paste is preferable to no paste (air).
Incidentally, because of the huge difference between the thermal conductivity of metal vs paste vs air, there actually isn't much difference between the different pastes. People have tested toothpaste, peanut butter, nutella, denture cream, etc as substitutes for paste. All of them work, just slightly worse than thermal paste (and you may end up with ants in your PC). The heated debate over which brand paste is best, is really just splitting hairs.