On the earth, we have light due to the sun. The layer of gases that surround the earth causes light to reflect and refract. Space is a vacuum where there is no gas, solid or liquid particle that may cause the light to deflect in the surroundings giving an illumination just like we observe from the surface of the earth. Despite the sun, stars and other heavenly bodies that shine as we look at them from the earth, space or the background is totally black.
The light, therefore, travels in a straight line without any dispersion just like a beam of laser which travels in one direction and gives a point which does not illuminate surroundings. The light of stars that we see is because it comes as a source in a straight line but is deflected because of gases and particles that surround the earth. Space does not have any light nor colours nor any scattering. Thus it ultimately appears black.