According to local legend, this site was first transformed into a site of religious worship by Cain. After the Great Flood destroyed the site (like it destroyed everything else on the planet), it was rebuilt by a race of giants under the direction of Nimrod, son of Ham and grandson of Noah. The giants, of course, made it possible to cut and transport the massive stones in the trilithon.
It should be noted that both Cain and Ham were biblical figures who did things wrong and had to be punished, which raises the question of why local legend would associate them with the Baalbek temples.
It may be an effort to implicitly criticize the site -- associate it with negative figures from biblical tales in order to create distance between it and the people still living there. These legends may also have been originally created by Christians who wanted to portray Roman paganism in a negative light.