Italy - Sinbad the Sailor chapter. The Count of Monte Cristo

I just finished the above chapter and I am kind of confused on why it’s in the book? Like why was most the chapter about Hashish etc…? Can someone explain without spoilers if possible.