Command Line FTP Client Confused By Tilde? I noticed this really weird behaviour in the macOS command line ftp client...

get index.html ~/Desktop/index.html


fails if there exists no 'index.html' on the Desktop with the error

ftp: Can't access `~/Desktop/index.html': No such file or directory


but

get index.html /Users/fweth/Desktop/index.html


succeeds!  Afterwards, I can also use the first command to update the local file.  Can anyone explain this to me?
What you are seeing is expected behavior.
The tilde (~) is a part of the shell's standard syntax that is synonymous with the user's home directory.

Tilde expansion is the process of converting these abbreviations to
the directory names that they stand for.

When you are in FTP, you are not using your shell (bash, csh, zsh, etc.), rather you are using the FTP client and it has no idea what the tilde means and thusly, it cannot expand it out.
~ and HOME are the same thing.  If you execute the command
$ echo ~ $HOME

You should get your home directory output twice.  (The $ is for variable expansion)
/Users/fweth /Users/fweth


Trivia
The convention of using the tilde (~) derives from the Lear Siegler ADM-3A terminal that had a keyboard shortcut for the the users' HOME on the same key as the tilde.