Okay, so trying to pin down a 'legendary origin' for Bahamut is tricky because it's a total case of fantasy telephone. In Western tabletop RPGs, especially Dungeons & Dragons, Bahamut is the Platinum Dragon, god of justice and good metallic dragons. That's probably the version most gamers know. But the name goes way back.
It originally comes from Arabic mythology, where Bahamut is this colossal, cosmic fish or whale that supports the earth. It's like a foundational world-turtle concept but fishier. Some medieval texts describe it as unimaginably huge, with layers of sand, rock, and angels beneath it.
The jump from a world-bearing fish to a dragon deity is fascinating. D&D basically took a cool mythological name and attached it to a completely different archetype. So there isn't one single origin story; it's a mash-up. The D&D version has its own elaborate lore about being the son of Io and battling his evil sister Tiamat, which feels like the 'legendary origin' in modern fantasy. But the older, weirder fish-god is the real deep-cut.