Ive been wondering when and what kind of events could have caused this.
As a Lebanese-American and foreign policy wonk, the history of my family has always peaked my interest. This response will attempt to cover a lot of late modern Lebanese history in one fell swoop, but if I fail to mention anything, please feel free to ask!
First, to fully appreciate the nature of the modern nation state of Lebanon, it's important to understand the roots of its very existence. While it is indeed true that the ancient thalassocracy of Phoenicia was centered around modern-day Lebanon, the evolution of the state's relatively liberal nature did not begin to take root until the 19th century. Between those two periods of time, the Phoenician/Lebanese/Northern Canaanite geopolitical entity -- anchored on the snowy peaks of Mount Lebanon -- was conquered and ruled by myriad empires, to include the Persians, Macedonians, Romans, Arabs, Crusaders, Mamluks, Ottomans, and French. This cyclical succession of imperial control (and, often, oppression) occurred until the seeds of Lebanese nationalism were sewn by intellectuals in the Beirut and Mount Lebanon area during the latter part of the 19th century.
While 19th century Lebanon was a far cry from what we would recognize to be "liberal" nowadays, a few major events occurred during this time that helped shape its future political direction:
The growth of Beirut and connections with the West. While this might seem rather tangential, Beirut (Lebanon's capital and primate city) played a crucial role as a hub for Lebanese intellectual activity and center of political life. Prior to the 1800s, Beirut was simply one of many Levantine towns competing for economic influence over the Eastern Mediterranean (Acre, Tyre, Sidon, and Tarabulus Al Sham were some of the region's more influential cities). In addition to its strategic position on the foothills of Mount Lebanon, Beirut was a refuge for Christians fleeing the 1860 Civil War in Syria, growing its economic base while the rest of the Ottoman Empire fell into disrepair. In 1888, the Beirut Vilayet was established as a subdivision of the empire, a nod to its newfound predominance over the Syrian coast. By the early 20th century, Beirut was handling 11% of the Ottoman Empire's international trade (Gabor Agoston, Encyclopedia of the Ottoman Empire, 87). In addition to all of this, the production of silk and other goods desired by European powers strengthened economic ties between Western Europe and the district surrounding Beirut (The American Silk Journal, Vol. 31, 64), furthering the political and religious orientation towards the West. The influx of goods from newly-industrialized Western countries also highlighted the city's importance as a center of East-West trade.
The creation of a world-class system of higher education in Lebanon. Beirut's prosperity attracted missionaries from the United States, who, in 1866, established the Syrian Protestant College (now known as the American University of Beirut or "AUB", one of the premier institutions of higher learning in the Arab world). Up until the Lebanese Civil War (1975-1990), Lebanon had arguably the best system of higher education in the region. After the war, however, the country lost much of its academic prestige to the oil monarchies of the gulf (e.g., Saudi Arabia, which now boasts the top three institutions of higher learning in the Arab world according to USNWR -- AUB ranks fifth on their list). There was a large brain drain that understandably accompanied the intensification of fighting during the 1980s, with those who could afford it fleeing every which way. Nonetheless, the development of an intellectual class in Lebanon aided its development and desire to differentiate itself from the despotic regimes of its neighbors.
The historical religious diversity of the area and development of Lebanese nationalism. While the Ottoman Empire was, in many respects, a more religiously tolerant place than medieval Europe during its early years, this faded over time as sectarian divides began tearing it apart, further exacerbating the rift in Turkish society between the various ethnoreligious groups that composed its patchwork of peoples. Earlier, I mentioned the 1860 Mount Lebanon Civil War. This was an uprising amongst the Maronite Catholics against their Druze overlords. It culminated in a massacre of the area's Christians, prompting their exodus from the Druze-dominated villages of the mountains to coastal towns such as Beirut, Tripoli, and Sayda. As a result of all this, European powers pressured the Ottoman Empire to give the Mount Lebanon district more autonomy, a move that fueled the flames of Lebanese nationalism. When the Catholic French took over the Northern Levant after the dissolution of the Ottoman Empire at the conclusion of the Second World War, they were understandably sympathetic to the plight of the Maronites. Thus, Lebanon, which had historically been a geopolitical subdivision of Syria-Palestine, became a new nation.
So how does this all relate to modern Lebanon's liberal character? While it wouldn't be fair to describe it as a liberal state in the vein of a Westminster-style democracy, Lebanon is tolerant by the standards of West Asia and North Africa. Until the great civil war in the 70s, Lebanon and Israel were the only two countries in the MENA region labeled "free" by the U.S.-based think tank Freedom House (it is now labeled "semi-free", with Tunisia now claiming the title of the only "free" Arab country). I will make the argument that this liberal or semi-liberal precedence was set over a century ago, when Lebanese intellectuals and religious refugees, brimming with wealth from the trade of both goods and ideas with the West, sought to create their own nation state rooted in the idea of democracy in the Arab world.
Of course, there was a downside to all this. After the formation of Greater Lebanon during the French Mandate of Syria and Lebanon, Muslims and Druze were essentially relegated to a status as second-class citizens in the new Maronite-dominated country. It wasn't a very liberal place for the Shia and Sunni minority at the time, who faced discrimination and exclusion from institutions of political power. This played a large role in the onset of the Lebanese Civil War, with Muslims demanding proportional representation and the Maronite Catholics, who feared losing the country's status as the Christian Arab country, resisting a change in the distribution of power. Unfortunately for everyone involved, the complicated and divisive civil war tore the country apart and sank the Lebanese economy, giving rise to the Christian and Muslim militias who would enforce their legitimacy through brute force.
In summation, Lebanon is recovering and yearning for a return to its ostensibly liberal past. Much remains to be seen however, as the country has ballooned in size from the influx of Syrian refugees as of late, growing in total population by one-third over the past few years. The government is still divided along sectarian lines, with Maronites controlling the presidency, Sunni the post of Prime Minister, Shia the speakership, and the Greek Orthodox the position of Deputy Prime Minister, among other gentlemen's agreements (i.e., what is known as the "National Pact", which keeps Lebanon's unique confessionalist political system afloat). Ever since the end of President Michel Suleiman's term in 2014, the country's parliament has repeatedly failed to elect another. As a result of the government's current level of dysfunction, garbage has been amounting in the streets and protests (some utilizing similar slogans to those we saw during the Arab Spring in countries such as Tunisia, Egypt, Syria, and Libya) have become commonplace. Temporary measures have been enacted to ease the current burdens on Lebanese society, but much remains to be seen. The country's government knows that its status as a liberal bastion of the Middle East is in jeopardy, but policymakers appear to be unable to come to a consensus to ensure its survival.
I hope this sheds some light on the topic of liberalism in Lebanon! The country is very diverse, and perhaps that provided the impetus for the development of its relatively tolerant religious attitude. If you'd like some further reading on the area, I recommend the works of George Antonius and Edward Said. Most of their writing is not about Lebanon per se but they both delve into the historical evolution of the Levant quite thoroughly.