As others have explained, the directory is changed in the child process of your script, not in the terminal process from which the script is called. After the child process dies, you are back in the terminal which is left where it was.
1. Symbolic link
Put a symlink in your home to the long path you want to easily access
$ ln -s /home/alex/Documents/A/B/C ~/pathABC
then access the directory with:
$ cd ~/pathABC
Put an alias in your ~/.bashrc:
alias pathABC="cd /home/alex/Documents/A/B/C"
Create a function that changes the directory, the function runs in the process of your terminal and can then change its directory.
4. Avoid running as child
Source your script instead of running it. Sourcing (done by
source) causes the script to be executed in the same shell instead of running in its own subshell.
$ . ./pathABC
(from here and here)
5. cd-able vars
cdable_vars option in your
~/.bashrc and create an environment variable to the directory:
shopt -s cdable_vars
Then you can use