An important thing to understand about quirks in the universe of “My Hero Academia” is that they are passed down genetically. Unless the child is born quirkless like series protagonist Izuku Midoriya was, the offspring of two quirk users will often either inherit a version of one of the parents’ quirks or a mixture of both. In the latter case, the combined potential of the two quirks merging into one often gives birth to an even more powerful quirk.
Todoroki’s quirk is a profound rarity, though it wasn’t an accident that he got it. Todoroki’s father — the ultra-aggressive superhero Endeavor — specifically arranged his marriage to Todoroki’s mother to bear a child that would have a mix of his own powerful flame quirk and her ice quirk. While Todoroki’s older siblings only inherited one of their parent’s quirks, Shoto himself finally realized his father’s dream by being born with a fused quirk. It was for this reason that he rigorously trained from an early age to be Endeavor’s successor and a stronger hero than the powerful superhero icon All-Might.