Deliberate strikes to the front of the throat can result in a collapsed trachea, the inability to breathe, and in some cases death because of that. It requires emergency surgery to fix. So for that reason, it's illegal in most MMA competitions including the UFC.
Why isn't choking illegal also? It's because it's more controlled and doesn't generally result in a collapsed trachea. There's usually enough time for the opponent to tap out. Most chokes also tend to be blood chokes which don't target the trachea and result in someone passing out due to loss of blood pressure, instead.
Air chokes are those that attempt to suffocate an opponent, sometimes by putting pressure on the trachea. One might wonder why that's not illegal, also. The answer is that once that is felt by an opponent, they usually have enough training or instinct (and time) to get out of immediate danger. Air chokes are considered not very effective by MMA fighters. Blood chokes are more reliable, followed by submissions, and then air chokes far behind that.
Whereas, strikes to the throat are instantaneous.
Accidental strikes to the throat happen all the time, but they're not generally enough to cause serious injury. And it has to be intentional and cause serious pain or injury in order to disqualify someone.
It's also illegal to eye gouge. It's because that technique is instantaneous and causes serious injury (loss of vision) which requires immediate surgery.
The number of rules in MMA / UFC has gone up over the years as they get better at understanding what can cause injuries. The basic philosophy is that you need rules in order to keep people more or less safe. Why is that important? Because if people get seriously injured each time they train at MMA, they'll never get better at fighting. You need to keep coming back day after day in order to get better. You can't do that if you keep getting injured.
Eye gouges, trachea strikes, testicle grabs, and so on are not core techniques. So their importance in fighting is secondary. And once someone has that core foundation, they rarely need to use those kinds of techniques such as eye gouges. They have other options. But they can easily do them if they wanted.
What is a core technique? The foundational / core skill of MMA is the ability to get into positions while fighting against a struggling opponent. This allows them to then go on and reliably apply secondary techniques such as a submission or an eye gouge.
Without that core foundation, you don't have the ability to get into proper position to apply these "deadly" techniques reliably against a struggling opponent. You might still pull it off in a real fight, but it's mostly by luck.
Most MMA people will tell you that they can very easily apply these techniques if they wanted to. And it's not like it would never occur to them in a real fight to do something like an eye gouge or a throat strike. But in an MMA gym or an MMA competition, they know they can't do those techniques.
Hope that helps.