It's been a while since I've done martial arts, but this reminded me of some other points specifically about sparring as a training tool:
At least in the modern version of sparring, one of the things we learn is how to spar. There are standard protocols to sparring depending on the form you're learning, and it's super important that you follow them.
This is not just about learning how to be the attacker--you also need to know things like how to fall right, which you learn for real life but also for sparring, because it can be really unsafe for both you and the person you're sparring with if you don't know the basics of how to keep yourself safe.
Tapping out! When you're doing particularly forms where you're touching each other/grappling/doing joint locks/etc., one of the main ways you signal to stop is by tapping out. This is key to keeping people safe during sparring.
People can get hurt during sparring, especially if you screw up. I once almost dislocated someone's shoulder doing a joint lock (they were fine, they tapped out, we talked through it, we figured out what I did wrong), and I had someone hyperextend my elbow once. It also seriously exasperated my wrist's repetitive stress issue, particularly from someone repeatedly muscling through something they shouldn't be muscling through.
You can also give people concussions, cause bruises, or even break bones if you aren't careful. I got a bruise that took months to heal (probably a bone bruise) from falling the wrong way during some exhibition sparring on a wooden platform.
If you start sparring/partnered fighting when you don't have the foundation of how to fight, especially if you're partnered with someone who doesn't know how to properly guide you, it's really easy to build bad muscle memory. The right way to do something, is not always the instinctive way to do it, and if you get thrown into partnered fighting unprepared you will fall back on instinct, not training.
If sparring/partnered fighting is 100% losing with no real guidance, it won't teach you how to ever win, it will just teach you how to lose, which is actively unhelpful. The goal of sparring in that way becomes learning how to lose less badly, which may be great for self defense but isn't particularly great for actually learning how to successfully fight.