So, some alliums (many? all? I know garlic does it) not only grow from a bulb, but also produce little mini bulbs in the flowerheads instead of (or in addition to? I'm not entirely sure) seeds
It looks like in your plant, one of those bulbils has got the wrong idea, and decided it's time to become full fledged flower stem instead of just a baby bulb.
Sort of the same sort of transient mutation that produces double flowers or four leaf clovers. Plants are flexible, and can have all sorts of strange things happen without it being fatal. Sometimes people even like it and try to cultivate it (though I doubt your particular weirdness is something that can be perpetuated)