Was randomly thinking about this today, considered making a thread about it.
Ok, so games are developed on PC and made for consoles. I know its probably not this simple but has there been any instances where the PC code or whatever for a console exclusive game has leaked? The only thing I can think of that comes close was either Pikman 1 or 2 had a PC executable left on the disc I think.
Now I don't work as, or even know anyone who has worked as a programmer for games, but I do know programming in general.
Basically, the "development" is writing the code (typically using software called IDEs, basically word-processors for code), creating assets, and compiling and packaging all that together (called "building", though that term is usually interchangeable with compiling).
To actually play the current build, they have to take it to a dev kit, a special version of the console with a bunch of extra stuff for developers. It is simply not possible to play it on a PC, the code is compiled for a different processor type and device architecture, so it will just refuse to run. It's like trying to plug a DisplayPort cable into an HDMI port; yes they both do the same thing, but they don't fit each other, and even if they did, it would just receive nonsense that a monitor can't interpret.
If Pikmin had PC executable on the disc, it means at some point they made a build specifically for the PC, and no-one removed those files before they made the final build to go to market. Weird, unused stuff makes its way onto retail discs all the time, because it is totally harmless so removing it is a low priority, and they don't bother.
One last note, even though it is a relatively simple process to cross-compile (compile for different processor architecture), that doesn't mean that you can make a PC version by just compiling for x86. The calls the program is making to external libraries and device drivers would fail, because those only exist on one platform or another. You have to port the whole thing, which involves rewriting and even redesigning big portions of code. This is also why that whole "PS4 switching to x86 will make porting easier" thing a few years ago was complete nonsense.