10400F (at ~145€) is about half the price of 5600X (~300€) at the moment, at least in Europe. It does not perform better, both lower IPC and runs at lower clocks but the performance cap it has (while lower than 5600X's) is high enough that GPU you need to exceed the cap on higher resolutions is in a whole different price range. Basically it is the exact same argument Ryzen 1000/2000 (and partially 3000) had
In addition to OEM targets and actually not creating too many different dies, why not have iGPU? It is genuinely a value-add. It does not limit performance in any significant way and the only downside is some additional production cost (which may or may not transfer directly to consumer). The fact that AMD doesn't have one is probably a good motivation to keep it.
That additional die space is not useful for more cores in Intel's case anyway, the amount of cores is limited primarily by power.