Slight correction: Every item has a base version and a legendary version! It took me a while to realize that, too, then I later saw that it's stated explicitly in the last bullet point of the game features list.
There are also golden anvils that will turn a base item into its legendary version. I don't know if anything causes them to appear, or if they're just random. I've only seen one so far out of 25 runs.