Why can I use Emacs shortcuts in many OS X programs?
Those key bindings are programmed into the standard text handing routines by Apple. Unless the programmer goes out of their way to write a text input library on their own, you get those key bindings for free.

Same as the close/minimize buttons and much else that is similar between programs. Much of a program comes from Apple's frameworks and SDK.