Why is an EFS-encrypted file decrypted when it gets uploaded to the Internet?
Because you uploaded the file.
As far as you (as a user) or any programs you run, the files are completely unencrypted.
EFS is designed to protect you against other users who have access to your system, not to protect you from yourself. It's intended use case is where you have a shared drive and a location where you want the data protected from other users, for the owner of the files the encryption is essentially transparent and the files are as good as unencrypted.
Any program you use to open the files, whether it is notepad, a media player or even your web browser will see an unencrypted file. As a result you uploading the file uploads the actual contents of the file, not the encrypted data.
When an operating system is running on a system without file encryption, access to files normally goes through OS-controlled user authentication and access control lists. However, if an attacker gains physical access to the computer, this barrier can be easily circumvented. One way, for example, would be to remove the disk and put it in another computer with an OS installed that can read the filesystem; another, would be to simply reboot the computer from a boot CD containing an OS that is suitable for accessing the local filesystem.
The most widely accepted solution to this is to store the files encrypted on the physical media (disks, USB pen drives, tapes, CDs and so on).
In the Microsoft Windows family of operating systems EFS enables this measure, although on NTFS drives only, and does so using a combination of public key cryptography and symmetric key cryptography to make decrypting the files extremely difficult without the correct key.
So the files are protected against other users and attack via alternative operating systems, not protected against you.
EFS is not a method for securely transferring files across the internet. It is essentially an ultra lightweight and targetted file/disk encryption system. It provides some of the benefits of disk encryption without the ongoing permanent overheads.
If you want the files encrypted then you should use one of the many dedicated programs for the task.