I have been wondering this question recently. Why does PE images have to be executable in MS-DOS? I've read on the topic and most of the answers I've seen simply explain it with compatibility. But what this compatibility actually means and targets?
If it was intended to allow a single executable both to run on DOS and Windows - what was the problem to include two executables for each OS instead?
Some of the answers I've read explaining it with compatibility states that if ".exe" files were purely formatted in the COFF format with the PE signature this would lead to a crash in the system when executed on DOS. But I was wondering if that's actually true. Wasn't the MS-DOS checking for "MZ" starting signature and if not would it have been so expensive to include such check and also perhaps another to print message similar to the DOS-stub if the image was starting with "PE" (and so it was a PE executable instead)?