Latin words that began with the fl- tended to become ll- in Spanish. This is consistent with the pattern in many other hard-constant-plus-L words, like pl- and cl-.
Excellent example: the Latin for “flame” is flamma. This evolved into the different-but-similar Spanish for the same: llama.
Who would’ve thunk?