No. In fact it's often quite beneficial to have some part of your fingers touching adjacent strings in order to mute extraneous sounds. I cover this in this tutorial on muting.
https://www.guitartricks.com/tutorial/2281/
Sometimes of course it's necessary to let an adjacent string ring open or sound another note. You can work on those individual cases when they show up in the music you are playing. But it's more often the case that you want to mute at least a little.
Another point about spreading out your fingers. It's not necessary in every case & not even optimal in many cases. When you are doing spider fingers it can help to maintain contact with the strings with the tips of you fingers, but release pressure and slide them up to make it easier to fret the next note & finger up the string. You also slide you hand up the neck a little bit as you do this.
This is great practice for three important reasons: you are learning to move you hand up & down the neck shifting positions, you are learning to use minimal pressure & tension to play notes, you are learning efficient motion.
In some cases it is helpful to hold down lower frets (for trills & licks that require it). But quite often it's better to just move your hand a little.
Hope this helps.
I agree with Christopher; sometimes it's helpful and even necessary to have a finger touching an adjacent string in order to mute it! 100 percent.
But, I'd say this exercise is more about teaching finger dexterity and flexibility; you wouldn't want to touch an adjacent string in this case. My humble opinion.
But there are many times--like muting the low E with the tip of your index finger when you're playing a barre chord with a fifth string root--that muting is essential. Try to play cleanly with this exercise though.