Sparring develops the correct stimulus-response loop.
One of the worst thing you can do (in fighting) is take your skills and apply them in the wrong context. Or note the stimulus, process it,and try to devise a response - way too slow.
Basics are about response. Better responses.
Sparring is about fitting that response to a stimulus in real time. You should do it at the greatest speed and power possible for safety. Playing at 'winning' within a defined set of rules makes this sporty sparring fun.
Another element of sparring is trying to elicit a greater range of stimuli (positional and movement), so you can look for new responses. This generally should be done slower, for safety reasons. Just make sure that attacker and defender slow down. It's not about winning it's about discovering your weaknesses.
One of the great dangers of sparring is that you can get locked into sparring 'rules' which never get investigated. That's why the Gracies were so successful. One of the most pervasive sparring rules of MA schools from the 60s to the late 80s was 'it must look like a Bruce Lee movie'. The other was 'thou shalt not throw', and 'thou shalt not wrestle on the ground'.
Other constricting rules are 'thou shalt not jump into somebody elses sparring session without invitation', 'though shalt not snap fingers' and so on. They make sparring safe, but SD is about training for danger, not training for safety.
I suggest sparring with rules most of the time, but also investigating what could happen if those rules were broken, and sparring as if they could be. In Judo for instance you are not allowed to put a finger or thumb inside your opponent's dogi because there is another rule that says, 'if they do put their fingers in you dogi, you may not spin your wrist and break their fingers'.
When I come to grips in Judo, I do so in a way that should prevent some punching and kicking. I don't take grips that open me up to a rib shot, or a kick in the unmentionables. When I box I keep my stance low as if grappling. It looks more like kung fu, and slows me down, but if my opponent was to change his mind and start wrestling me, I'd still have half a chance.
What I do isn't perfect and remains safe, but it I try to keep it open minded.
So, to sum up: Sparring is to fit your basics with a given stimulus or to investigate new possibilities of being attacked, so you can go away and train a response to such an attack.