Many transfer mechanisms have no idea what the size of the file they are downloading is. Check out this related SU question: Why do some downloading files not know their own size?
Also, the transfer mechanisms have no idea what data is supposed to be in the file; so it has no idea if that 1 it just read in the download was actually a 1 at the source or if it's a 1 due to corruption during the transfer.
If the download stream encounters too many retries, a time-out elapsing, or other recognizable transfer errors, then the transfer is stopped. Since download mechanisms save that download stream as it arrives, it writes the file until the incoming stream stops, regardless of why it stops. Whether that incomplete file is kept or not after it's known to have a transfer failure, is up to the client/mechanism used.