So far, doing a casual check, I've found two cases of MMA fighters breaking their leg on a checked leg kick, and at least two of people having their legs broken by receiving a leg kick, so the record seem reasonably even, not counting the non-fracture results of leg kicks slowing people down, putting them in pain, etc, so I think there might be more of an observer effect going on where the times it happens stick out in our head more than when it doesn't happen.
So why does it happen?
I'll prefix this by saying I am neither a medical professional nor a professional fighter, so I am not an expert. That said, I think a lot of it comes down to bad luck and the fact that the human body, no matter how well conditioned, can still wear down and break. Ideally, when aiming a strike, the goal is to strike the target in a way that maximizes damage to the target while minimizing damage to yourself. There are all sorts of aphorisms and techniques involved, but it basically comes down to that you want to hit the weaker part of their body with the stronger part of yours. If you are off-target, you may wind up striking with a weaker part of your body or against a harder surface. A classic case is punching without proper bracing or hitting bone, resulting in things like wrist sprains or broken fingers. Or, in the case of kicking, breaking your toes by having them be the point of impact.
Complicating this, of course, is that fighters don't strike in pristine condition. Even aside from damage taken during the fight (say, the previous strikes), they may be carrying injuries from prior fights, training, or even just day to day life. All of that can add up to introduce damage that will make a limb more likely to break. While the bromide is that that which does not kill you only makes you stronger, microfractures in the bone can compound and lead to the bone becoming more fragile. Dr. Chris Raynor has suggested that this was likely a major factor behind MacGregor's broken leg in his July 10, 2021 fight.
So why do leg kicks?
Well, as noted above, these injuries, while gruesome, are fairly rare. A fighter might throw hundreds of leg kicks without a severe injury like this. Compare that to the amount of broken fingers in boxing or grappling And leg kicks, while seldom enough to end a fight, can significantly reduce a fighter's mobility, and in a self-defense situation, may cripple an opponent long enough to make a run for it.