I have read that if the "execute" bit is not set on a directory, then you can't set that directory as your process's working directory.

But I don't understand why is that, I mean when you set the working directory of your process, you are only changing a string in your process's memory. So what does setting the working directory of your process have to do with the "execute" bit of a directory?!