Theoretical is just that and some of the more expensive lenses do get close. I think that a f/5.6 lens could be made with as good an image quality that a f/2.8 lens (both 400mm) has at f/5.6 for less money (than the f/2.8 lens) because of the smaller pieces of glass used. They would have the same MTF values at f/5.6. There would, however, be more vignetting for the f/5.6 lens because of the smaller pieces of glass.
However, to make the lens cheaper the f/5.6 lens may not be as good as f/2.8 stopped down to f/5.6.
To improve a f/5.6 lens (to the level of the f/2.8 lens stopped down to f/5.6) could involve more expensive glass types for example. These expensive types are used in the f/2.8 lens. I suspect an improved (resolution-wise) 400/5.6 lens would involve selecting more expensive glass that would drive up the price. I think this is what we are seeing with many of Canon's lenses as they get updated. They could probably build several different 400/5.6 lenses with different price points according to the types of glass used but this is impractical. The old lens will provide a lower price point option so long as it says in production.Understanding resolution is not a simple topic. The Rayleigh Criterion in the reference I gave above is the "textbook" example. I got this in a class I took in microscopy decades ago. In this next reference (link at end of this statement) the authors argue that this is not good enough for digital. It is very long but if one scrolls down and looks at the tables (the resolution numbers in the columns go up (apertures decrease in size as one goes down) in each table but the values vary according to criterion - going across in the table (for a given aperture)) it is obvious that the maximum theoretical resolution (i.e., diffraction limited) at f/2.8 is greater than f/5.6
Theoretically that is obvious, from a practical standpoint aberrations and mp limits cut in way before that when wide open for us camera users and the lenses we actually have available. Your assumption earlier was "assuming similar correction for lens aberrations", it is more than four times more difficult, many would say sixteen times, to manufacture a 400 f2.8 than a 400 f5.6 with the same optical aberrations.
Theory ends when "limited" purchasing options are all we have.
The 400F5.6 is SHARPER in the corners than the 400F2.8...
There is theory, and then there is practice... Yes, in theory, a F2.8 lens could be made sharper than a F5.6 lens, but given the limited precision of manufacturing (it is not perfect and you can not polish off fractions of atoms) and the aberrations in glass, in the real world the problem becomes how to make that F2.8 lens as sharp as an f5.6 lens.
When we are comparing the two, you have to be comparing similar materials and similar designs. The 400F5.6 is a 20+ year old design and used UD elements. The 400F2.8II lens is just a few years old and uses fluorite elements... it was designed with better software and it is manufactured to higher tolerances. If you used that same level of technology/materials on a new 400F5.6 it will be noticeably sharper than the F2.8 version.
Also, with the same design, because of the larger elements, there is much more thickness of glass for the light to pass through in the F2.8 lens. This has the effect of both reducing light and increasing the odds of hitting an aberration. In theory, the glass is perfect. In the real world, it has flaws.