In the early days of mixed martial arts, the sport was pretty much a wild west. When the UFC was founded in 1993 it heavily promoted the concept that the fights featured had absolutely no rules, which while effective in garnering an audience curious to see whether such an event was even legal, it wasn't actually quite true.
Even UFC 1, that saw Royce Gracie become the first tournament champion by choking his opponents until he saw fit rather than when they tapped, did in-fact have a ruleset.
Now it wasn't exactly restrictive, but it still prohibited fighters from attacking the eyes, groin, or biting. Which was probably necessary to distinguish the UFC from a total bloodsport.
In the years since the sport has gone through a litany of rule changes to better protect the fighters and also to veer more towards sport than spectacle. The 2001 Unified Rules of MMA were heavily influenced by veteran referee 'Big' John McCarthy and set the template for what most people would consider a modern MMA fight.
However, despite the rule changes, with referees often criticised for their failure to properly implement certain rules, fighters have still found a variety of ways to, shall we say, circumvent the ruleset to their advantage.