system
Given the following post, respond as if you're commenting on Reddit:
human
Eli5: Why don't Macs and PCs use the same type of executable file?

Why do macs use .app files and PCs use .exe files? Isn't it just easier to make both OSes run .exe files?
gpt
There are a few things to consider here.

Firstly, what we typically call PCs are PCs running the Windows operating system, created by Microsoft. Macs are very similar computers running the Mac OS operating system, created by Apple.

The operating system can be thought of (for ELI5 purposes) as the program on your computer that manages how the rest of the computer works. Your operating system controls which other programs have access to your computer's hardware (for example the CD drive, hard disk, and the CPU which is the 'brain' of the computer) and what kind of order files are stored in, as well as how everything is displayed on your monitor.

All other programs work "on top" of the operating system.

All computer programs are written in a special coded language, which computers can understand (again, close enough for ELI5).

Instead of every program having to include all the code needed to make a window on the monitor, how to write a file to your hard disk, or how to send something to a printer, programs include System Calls. A System Call is a special piece of code that asks the operating system to do something. 

For example, a program wanting to print to your printer would send a system call to Windows, or to Mac OS, along with the information it wants to print out. The operating system then runs the part of its program that knows how to send files to a printer.

This is great because there are so many different printers, which all work slightly differently. When you install a printer, you just tell the operating system how the printer works (by installing something called a driver), and every other program just gets the operating system to do the printing.

**So, onto actually answering your question:** Windows and Mac OS use different System Calls. 

Think about how a window looks on a Mac, compared to on Windows. Because the window has to be drawn in a different way you need to give a different set of information to the operating system so that it can draw the window onscreen for you. 

Because they use different system calls, you need to write the code differently, so to differentiate between a Mac OS program (with Mac OS system calls) and a Windows program (with Windows system calls) the files are named differently.

**Extra info:**

* The other interesting thing about .app files is that they are really just a folder containing several different files, including the executable. So where a .exe is just one file, a .app can contain a few different files. Similarly, .exes often contain more information than just the program code itself, but it is all stored in a single file.

* There are other operating systems than just Windows and Mac OS. Some of these use different executable file formats. For example .elf files are commonly used on Linux and Unix-like operating systems (these can run on 'PCs' too, which is why we need to differentiate between a PC and a PC running Windows). .exe files originated on DOS operating systems.