Goats that climb trees in Morocco are becoming one of the classic tourist stops for the country. They can be found on the road from Marrakech to Essaouira about 30 minutes from the coast. The exact location is here. They climb in the morning hours, try and make it there before noon.
The goats have cloven hooves which are divided or split into two toes, ideal for climbing branches. Traditionally these goats in Morocco only climb the Argania spinosa, typically referred to as the argan tree. The tree produces small yellow flowers which have a small fruit. The goats after eating all the nuts within reach would climb the trees to get more.
Now the goats are herded into trees to attract tourists. The farmers will ask for money in return for pictures of the goats. They will also offer to let you hold a goat and climb the tree. Watch out because the goats poop from the tree above you.
Goats in trees is definitely one of the more unique things you can find in Morocco. It's worth the stop and photo.