Originally, it let you learn about already existing legends
Legend Lore has its origins in Greyhawk, not the Forgotten Realms where the concept of The Weave stems from. It was published in 1976 in the first expansion to the original Dungeons and Dragons game, Supplement 1 - Greyhawk.
The original text for the spell is minimalistic and does not provide any kind of "under the hood" workings, other than that a great conjuration effort is required:
Legend Lore: By means of this spell the magic-user seeks to gain knowledge of some legendary item, place or person. (It is necessary for the referee to decide if the sought-after thing is in fact legendary in the scope of his campaign.) Such a spell requires great conjuration, so the time necessary can range from days to weeks (roll percentile dice, 01 = 1 day — 00 = 100 days). Often times the information gained through the spell will come in the form of a riddle or a poem.
The version in the 1e PHB goes deeper (p. 85)1: the text here makes it clear that in spite of maybe spending weeks in casting the spell, it may not even give you the information outright, merely where you can find it. And it only provides information about legendary material that is available:
When completed, the divination will reveal if legendary material is available. It will often reveal where this material is - by place name, rhyme, or riddle.
This means if cast normally, it would only be able to retrieve information that has already been turned into some kind of legendary material. If, say, you are a lich and someone stole your phylactery, it would not yet know where it was hidden, even if you are legendary or your phylactery was, as no legends have yet been written about the theft yet, no songs composed.
There was also a matching bard ability called Legend Lore, which provided a percentage chance that a bard would "know something about a legendary person, place or thing" (p.118), that supports the idea that the spell delivers knowledge about existing, knowable legends, it does not create it:
Due to training, a bard has knowledge of many legendary and magical
items (...). If some legendary knowledge is appropriate and the dice score indicates that the bard has knowledge in the area, then his or her ability will deliver information similar to the magic-user spell, legend lore (q.v)
So the spell in general tapped into existing myth and legend, and worked as a worldwide magical library or oral tradition search.
There only is an exception if the object is directly at hand. In these cases, the spell could generate new information, but only in cryptic form that you would have to interpret. No rationale for how that part works is given.
It will sometimes give certain information regarding the person, place or thing (when the object of the legend lore is at hand), but this data will always be in some cryptic form (rhyme, riddle, anagram, cipher, sign, etc.).
1 In a way, 1e AD&D can be seen as a compilation of the rules that evolved over time from the original D&D rules and additional supplements, as played in Gary Gygax' home Greyhawk campaign, with a few extra bits like psionics added. Therefore, it is useful to consider the rules text for spells from these two sources together to understand how the spells were conceived and worked originally, although they could undergo some evolution based on the campaigns' play experience.