My apologies in advance if I have misunderstood your question. From what I gather it sounds like changing folders within a script sets the new current folder within the script though it does not necessarily set the current folder from the perspective of the terminal that invoked the script.
it could make this more clear if you put a print statement after the cd ..
to show you the directory from the perspective of the script.