The short answer is that alcohol is specifically named as haram by the Qur'an, while hashish is not.
The long answer is that modern marijuana prohibition in the Muslim world is based on the simple interpretation that alcohol is haram because its mind-altering properties interfere with your relationship with Allah. Marijuana also has mind-altering properties, which can interfere with your relationship with Allah. Therefore, it is haram.
Interpretations of the Qur'an have changed over the years. The Ottomans had not developed that interpretation at the time, most likely because hashish was used like coffee and tobacco as a parlor drug, not as a means of debauchery.
Is it actually a big part of Turkish or Ottoman Culture? I know it's in that movie Midnight Express, which is based on a true story, but if I recall correctly, the context of his drug use is as much hippie culture as Turkish culture.
I've read more ethnographies of Turkey than most people and it has never come up in any. I've lived in Turkey and extensively traveled in Turkey, and it's definitely not a big deal in contemporary Turkey, either. For instance, look at this post on /r/turkey--"Why is using weed so harshly penalized in Turkey and so hard to find?". That I think gives you a sense of cannabis usage in Turkey. There are certainly young people--especially secular kids in the big cities--who use it and what not, but as far as I can tell at far lowers rates that Europe or North America.
Honestly, drinking rakı is a much bigger part of Turkish culture than hash is (and the vast majority of people in the country do not drink alcohol). Do you have any source that it was particularly popular in Turkey?