This is because of the security implications with uploading filedocuments. The MendixObject is stored first (to check whether the user actually has rights to that Object) and the file is stored afterwards.
If we didn't do this people would be able to overwrite files that they don't have access to.
If you'd like this to work differently you can fill out a feature request in MXDN.