Map of Yeísmo in the Spanish speaking world. Blue areas have the same sound for y and ll [IPA:/ʝ/; ENG:"y"], areas in pink maintain a distinction between the two sounds [IPA:/ʝ/+/ʎ/; ENG:"y"+"ly"]
What I find interesting about this is that this transition also happened in highly unrelated languages such as Hungarian, Greek and Swedish, not only in related Portuguese and French.
In Hungarian, /ʎ/ in most dialects turned into /j/, but the spelling ⟨ly⟩ was preserved, hence lyuk [juk].
In Swedish, /lj/ turned into /j/ in word-initial positions, but the spelling ⟨lj⟩ was preserved, hence ljus [ˈjʉːs].
In Cypriot Greek, /lj/ is often pronounced as [ʝː], especially by younger speakers. In Standard Modern Greek, it always surfaces as [ʎ].
I guess people find it hard to pronounce /ʎ/ but are too inert to change the spelling.