Tilde expansion is part of shell command processing, not part of `cd`. `cd` sees the already-expanded path as its argument.
POSIX requires `cd -` to be equivalent to `cd "$OLDPWD" && pwd`. `OLDPWD` must be set by `cd` if `PWD` exists at the time of running the command.