The Manager's file manager uses simple HTML file upload features and PHP to process the uploaded file, just like any HTML form with a file upload field. HTTP was not originally intended for file transfer, just for relatively short hypertext files - i.e. simple text files with links to other hypertext files. Handling binary files like images and forms with the ability to upload files was added later, actually HTTP file upload was first officially described in 1995. On the other hand, FTP was originally intended and designed for file transfer. Apache/nginx and friends are HTTP servers, so they just don't handle uploading of large and/or binary files as well as a dedicated FTP server does. SFTP is a different matter altogether, being a function of SSH.
Browsers and servers had to be modified to enable the processing of uploaded files. Most servers have modules to provide this functionality, so it's possible to have an HTTP server that does not handle file uploads at all.
When a server receives a file that is uploaded via HTTP (the form's GET or POST instructs the server to fetch the file and provides the path to the file on the client's computer), it is temporarily placed in a common holding directory with a randomly generated name, and the file's metadata is made available for a period of time. A script (in whatever language, perl, ruby, python, php, C, etc) needs to be written to process the file, moving it to the desired location and renaming it according to the information in the metadata. PHP provides the $_FILES array by fetching that metadata from the server and converting it to a PHP array. Our .php file processing script (see core/model/modx/processors/browser/file/upload.class.php) uses that array to move the file to a permanent location. The temporary file is automatically removed from the server.
http://tools.ietf.org/html/rfc1867
http://commons.apache.org/proper/commons-fileupload/using.html
http://wiki.nginx.org/HttpUploadModule