Let's say it out loud: karate doesn't provide defense against wrestlers and MMA fighters. Or does it? I heard the old-school karate (Okinawan karate) includes grappling and such, but I never saw any old-school karate v. MMA fights. The argument "we can't poke your eyes out and use our deadly blade-hands, that's why we suck in octagons" is week, imo. Stripped of its "dirty" technics, does karate have nothing to offer against takedowns and other things that are not kicking and punching? Lyoto Machida, if you feel like mentioning his name, incorporated a lot of seemingly non-karate technics, it doesn't even look like karate, frankly
Yes and no.
Historically, Karate developed from Chinese kung fu flavours. Thus, it inherited some of the shortcomings and inherent flaws of these styles, as written by Steve. That is only half of the story, though.
On the island of Okinawa, this style of fighting experienced a cultural contextualisation: Firstly, the Okinawans were more readily testing techniques in open bouts and were quite militaristic towards the end of the 19th century when te (later kara-te, which originally probably meant 'Chinese hand' and was reinterpreted later to get rid of the mentioning of anything Chinese) arrived and was more widely trained. This kind of pressure testing and combat application was already in decline in China at the time. Same holds for mainland Japan, which is one of the main reasons for karate's transformation when it spread. Secondly and more importantly, there was traditional Okinawan wrestling called tegumi.
This means two things: Firstly, every young man on Okinawa starting karate knew how to wrestle. They did it through all their childhood. Secondly, while not necessarily part of the curriculum proper, grappling was seen as a given and was systematically integrated into the fighting and expanded upon. That is what most of the currently obscure kata movements are about, after all. This strange move where they end up bent over, low stance, with forearms crossed? That's a sprawl to defend against a takedown.
Thus, you would have to see karate and tegumi as conjoined twins sharing vital organs: only as a unity they are whole, and wherever you feel that there is something lacking in karate, these gaps would very likely have been filled by tegumi in historical Okinawan teaching.
As the more-or-less-accurate post in the link points out, much of this has been lost due to various reasons so that contemporary Karate evolved into something that indeed has inherent flaws in terms of a fighting system.
Does that mean that Machida did not do karate in MMA matches? This depends on the perspective. If you listen to the Lex Friedman podcast with George Saint-Pierre, who came from a kyokushin karate background and was one of the best to take people down and control whether the fight takes place on the ground or standing up, he answers clearly that it was his karate training, not his BJJ or his wrestling training, that enabled him to do this. Karate taught him the distance management and timing necessary for his MMA dominance. Machida often referred to karate being the base of his fighting style in a similar way when asked about this in interviews.
Thus, I'd say karate for itself is no good for MMA and grappling defense. But if two of MMA's all time greats came from a karate background and said that this was the base and core of their fighting style, it certainly can ne appropriated and augmented or 'made whole again' if we speak in the above picture. This is mainly due to the footwork, speed, and distance management it trains along with solid punching and kicking skills, especially when you train a full-contact style.
The short answer is: No, karate does not train people to deal with wrestlers.
The long answer is that karate does have grappling built into it, but it tends to be of the stand-up variety and only for self-defense, not for fighting.
The more complicated long answer is that karate originally came from kung-fu styles such as White Crane kung-fu and Incense Shop Boxing. Those styles also do stand-up variety grappling, concentrate on self-defense applications, but also have flow drills and a kind of chi-sao / push-hands practice which can actually be used for fighting as well. And Okinawan karate does incorporate some of that still today.
In general today, karate consists of 2 relevant practices: Free sparring, and Kata Bunkai.
Free sparring means that you're free, not holding onto one another. It's punching, kicking, blocking, and body movement. In some forms of karate, grabbing is not allowed. In other forms of karate, it's okay to grab in some ways but not others. In less forms of karate, throwing is incorporated at some point, typically after 1st degree black belt.
In virtually no form of karate I've seen is it allowed to do what MMA or BJJ does with grappling, especially not taking someone to the ground and submitting them. That's not free sparring, so when it happens, it's stopped, and the two practitioners will have to let go of each other and stand up again.
The purpose of free sparring is to deal with that part of the fight where you're at a distance. Many karate practitioners mistakenly believe this is all they need, because if they do it right, they can always maintain that distance in a real life fight. And since they're comfortable with and skilled at that distance, they feel like they should be able to win real fights. But reality has shown time and time again that it almost never goes as planned. So this is an incomplete practice.
Then there's Kata Bunkai. This is an Okinawan karate practice which attempts to analyze kata (forms) for their self-defense techniques. What self-defense techniques are we talking about? The usual ones. For example, someone grabs your lapel and cocks back their other hand's fist getting ready to punch you in the face. Or, someone grabs you on the shoulder from behind, spinning you around to punch you in the face. Or, someone has a knife and is about to stab you with it in your stomach. Or, someone gets you in a side head-lock. Or, someone grabs you from behind in a bear hug, pinning your arms against your body.
In karate kata bunkai, you learn throws, joint locks, bone breaks, hair pulling, eye gouging, chokes, and so on. That's what is actually going on in karate kata.
For example, if someone bear hugs you, you will push your elbows outward while sinking down in your stance a bit. This will get your arms free and raise their locked hands upward. Then you grab their wrists and push straight down to break open their lock. There's a hidden reverse head-butt here that might knock out your opponent. There's also a throw you can do at this point. If you maintain wrist control, you then pull their arm out to the right side. Then you step behind him and throw him with a turn of your hip. If he struggles, elbow strike him to the head while grabbing the back of his head and drawing it in to your elbow strike. This is in the opening moves of kata Naihanchi (Tekki). It's why this form is done in the horse stance.
Karate kata all contain mostly these sorts of stand-up grappling based self-defense techniques. That was their original purpose. Whoever made them thought these were cool techniques to preserve. That stuff can come in handy in real life, as the thinking goes.
The blocks you see in kata often aren't blocks. You learn to block in free sparring, not in kata. Kata isn't going to teach you how to block, for the same reason why you don't learn grappling by free sparring. The two teach completely different things.
I explain this more at the following link:
That link includes another link where I go over a kata bunkai example for a particular sequence of a few moves within one karate form.
You might be interested in my answer at the following link as well, discussing why those blocks in kata really can't be blocks most of the time:
Now then, how does the grappling that's taught in karate differ from that of wrestling, BJJ, Judo, MMA, and so on?
The answer is that karate's grappling is for self-defense, whereas all those other styles teach grappling for sport / fighting.
What's the difference between self-defense and fighting?
The answer is that self-defense techniques are very limited. They are scenario-based. Someone does this, so you do that. It's a look-up table of attack and counter. That's it. It's not a system. It doesn't teach you what happens if things go wrong and the guy struggles with you. When someone struggles with you in such a way that you can get hurt, that's called fighting. And yes, I would include sport based fighting as "fighting" as well.
Classical jujitsu is basically the same thing as self-defense, too. And in many ways, karate kata bunkai look very similar to classical Japanese jujitsu. It's because there are only a limited number of ways the body can move. What works in classical jujitsu works in karate pretty much the same way, with maybe some stylistic differences.
If you recall from history, Judo was a way of practicing classical jujitsu technique in a way that could be done for sport. It had to first establish rules to make sure nobody got seriously hurt. You can still get hurt, but it won't be serious in training. Because, if you get seriously hurt, you're not going to make much progress. You'll have to heal first before coming back, if you come back, and that will take valuable time away from your training.
What that did was to allow practitioners of Judo to fully resist each other. It was a struggle. And when you're struggling with someone else, you are basically fighting them. That's the difference between Judo and classical jujitsu.
Classical jujitsu is compliant. Your partner does something, then you do something to counter it, and he lets you do whatever you want. He's not struggling with you to win against you.
Karate kata bunkai is practiced the same way as classical jujitsu. You have a partner, he does something, and you do something to him to counter it. But he lets you. He's not wrestling against you like a Judoka would do.
So karate's form of grappling typically isn't training how to deal with a struggling opponent. That's why when you take a karate practitioner and put them up against a grappler from a style that does practice with liveness and pressure (Judo, wrestling, BJJ, MMA, Sambo, etc.), the grappler will totally own them. A karate practitioner himself may have hundreds of grappling techniques understood, but unless they train with a partner who is actively struggling against them, they won't be ready for that when it happens.
And so, karate does train grappling. But it's just for self-defense, not for fighting.
Lyoto Machida, as was mentioned in the original question, is a karate practitioner who did well in the UFC. For a long time, he was unbeatable. But keep in mind, he was not just a karate practitioner. He trained MMA and BJJ. He was a BJJ black belt by then. His UFC fights did incorporate elements of shotokan karate that he was able to use very effectively. But it was more karate principles than karate techniques which he used. And he would not have been able to win without his BJJ and MMA training.
Let me get back to the flow drills and chi-sao / push-hands kinds of drills that karate borrowed from Chinese kung-fu arts. These actually do allow karate people to train against a struggling opponent to some degree. It's very limited, however. It teaches a tiny idea for connecting, sticking, and following the arms of your opponent. It's a concept that's common to many Chinese martial arts, including T'ai Chi, northern mantis, southern mantis, wing chun, bagua, hsing-yi, white crane, and more. It is intended to bridge the gap between free sparring and stand-up grappling, allowing karate practitioners to go from one to the other more effectively.
But the skill level attained by training those kinds of push-hands like drills for even a couple decades generally pales in comparison with what MMA, wrestling, or BJJ gives you in less than a year. Those other styles develop it along with everything else. It's not something separate like in karate. They're using it everyday, because they have to.
All of what I wrote is not to bad-mouth karate and say it's just inferior to MMA, or to ask why on earth would anyone do karate when they could be doing MMA instead. What often matters in martial arts is not whether you're doing the best thing possible to learn how to fight, but rather, you're doing what keeps you coming back for more.
Karate attracts a certain kind of person who would not seriously consider even stepping into an MMA school, even if they know MMA would make them better fighters. They might not care about fighting. They may only want something that gives them some ability to defend themselves, and karate satisfies that goal. For them, it's a lot of the other things that karate gives them which is much more important to them personally. The fighting aspect is a tiny consideration for them.
One of the most basic things that karate gives people is a path they can be on where they can see themselves making progress and getting better and better. From white belt to green belt to brown belt to black belt, and all the degrees of black belt, a karate practitioner can see themselves learning more and getting better. Psychologically, that's all most people want. That attracts them in the first place and keeps them coming back. Most people stop caring about wanting to fight after their teen years. In their adulthood, they may never get into a real fight for the rest of their lives. So to them, being the most badass fighter is really not something they're trying to be.
You can apply this to MMA as well. People train MMA to be better fighters. But there are MMA schools and then there are Fight schools. Fight schools take MMA to a much more extreme level. They're training people who aspire to be professional prize fighters. Those guys aren't human! Haha. So, why wouldn't you do a Fight school instead of a nice, comfortable MMA school? Coward! Haha.
The point is, there's always something more hard core. And if all you care about is being the best fighter on earth, you should go out and find the hardest hard core school out there. That's your purpose and your path. But for others, they don't have that purpose. For them, karate is the answer. It will let them be on their purpose and make progress towards their own goals. And for them, that's their hard core.
Hope that helps.
As you did mention Lyoto Machida in your question, the only thing I can think of that is "real" Karate and helps against a wrestler or MMA fighter is the very quick, very responsive footwork that made The Dragon stand out so much in his prime (for me, at least). I seem to remember many of his fights where the opponent would try to engage in wrestling or a takedown attempt, only with Lyoto jumping out of the way (specifically, backwards, not sideways as most other MMA fighters seem to do) lightning quick.
Non-karate folks seem to mostly defend a takedown by the usual sprawling, which also involves a backward motion, but where the goal is that they get their hips/legs far back, often with them ending up on top of the wrestler while the attacker tries to get their double leg takedown - at this point, being "on top" still seems to be very defensive.
Instead, in karate, the forward-backward motion seems to be as highly developed if not more so than any other direction. I mean it's right in the stance...
Secondarily, and this is may be shared with kickboxers, I believe the ever-present danger of all manners of kicks does make a wrester think twice when deciding whether to close in or not. Karateka seem not to only use the "usual" kicks that are popular and frequent these days (i.e., sidekicks to the head, or kicks to the legs), but especially also kicks straight up front. If there is a real danger of a "no can defense" kick coming at any time, with no upfront warning, then that again gives a wrestler another thing to think about.