I understand it has to do with Ottoman occupation, but then why aren't all the territories that were once Ottoman, muslim?
I mostly know about Bosnia, but I imagine Albania had somewhat similar circumstances, and those are the only two Muslim countries in the Balkans. (Kosovo is ethnically Albanian)
Essentially, back in the 14th and 15th century, there was a relatively powerful Kingdom of Bosnia which had its own Christian church. This church, however, was pretty weak compared to the Roman Catholic or Serbian Orthodox churches which are dominant in the Balkans today.
When the Ottomans took over Bosnia, they offered incentives to the locals to convert to Islam, such as land and tax breaks, and more power within the empire. The Bosnians who did convert were largely members of the weak Bosnian Church, who were really more concerned with their own well-being than with religion. However Catholics and Orthodox Christians largely refused to convert.
While there were many Turks who immigrated into the Balkans and whose descendants remain there today, most Muslims in the Balkans are descended from the Slavs and Albanians who converted to Islam to gain land and improve their status.
Source: The many readings I had to do for my Yugoslav history course.