Because space is not just another character. Space separates args.
If your flag is for a path, you can assume everything up to the next flag is a path name.
myprog -filename here is my path with spaces -another_flag
Of course this depends on how the shell gives the arguments to the program.
On the other hand, there is no excuse why some GUI programs cannot handle spaces.
So, that's just one file?