Necessary for what? Apparently not for the formation nor the continuence of life. A large central mass should aid formation of a dense dustcloud and the formation of planets, but it needn't be a sun. Imagine that earth cut loose from the sun right now and set out for interstellar space, total dark, total cold. Would life cease to exist on earth? Correct. Life would not cease to exist on earth. Those microbes inside the rock of the crust would happily continue to churn out ammonium and eat sulfates forever or at least a few billion more years.
The sun, great to have if you have one. Not necessary.