I was told the castle-like structure used to be the camel hotel. For safety of the caravans while ready to rest.