Because Windows is opening a file with no recognised extension using its default text editor, which is Notepad. Nothing is broken; the files just are not being handled as batch scripts.
The fix is to make sure the filenames are saved with the correct extensions:
For the server: runserver.bat
For the compiler: compile.bat
If Notepad has already added a hidden .txt to the end, turn on the option to show file extensions in your folder settings so you can see and correct it. Once the .bat extension is right, double-clicking will execute the script instead of opening it for editing.
Also edit the files from within the source folder rather than a copy elsewhere, since the scripts reference paths relative to their own location.