You use "...מחוץ ל" when you want to say "outside (of)" something, and "בחוץ" when it's "at the outside".
I am outside the shop - אני מחוץ לחנות
Are you in the shop? No, I am outside, in the street - אתה בחנות? לא, אני בחוץ, ברחוב
I am going out, now I am outside - אני יוצא, עכשיו אני בחוץ
But I realize today that it's best not to say it in English because it doesn't really mean the crab is walking from in the water outward (which is what I thought at first). The Hebrew sentence only makes sense in Hebrew. Therefore Duo's translation stands...it seems the best advice this time is to go along with it, but don't treat it like standard English!
The given sentence (in Hebrew and English) suggests the whole walking is done outside the water. "Walks out of the water" suggests a movement from inside the water to outside the water. In Hebrew we'd probably say יוצא מהמים, but if we insist on using the verb הולך and not יוצא, to be closer to the English, we can say הולך אל מחוץ למים.
My understanding is that the מחוץ word itself indicates that it is outside of, and the מ indicates the "away from" part. Just like you could say:
אני רחוק מהחנות - I am far from the store
And the מ would indicate being away from.
The ל makes little sense but is how it works... oftentimes these prepositions have no exact translation into english, you just have to pick up on the patterns through good repetition.
My advice is to learn that when you use מחוז you follow it with ל on the next word, and not try to think too much into the specifics of why that is.
I haven't been able to find the tips and tricks page that explains points like the one that has been discussed because of this sentence (מחוץ למים).
When I first started using Duo, I was able to find and read it. But now, it seems to be missing from my home page. Why could that be?
Many thanks in advance.