the hash is a checksum based on the file contents to identify the file
if the contents of the file stay the same but it gets moved and renamed and whatever else, then it's still the same file, so has the same hash
if however the contents change, but the filename stays the same and it stays in the same place, it's no longer the same file, so the hash changes