Those pictures are real, they are just a combination of different ones, one that measured the amount of light emitted by the earth at night (on which stars would obviously show up very bright), with outer space cut out and overlaid on a normal "dark earth" photograph.
You can download insanely high res versions of the quare "earth by night" from the nasa website (so big i cant even edit them in photoshop
), it definitely serves a real scientific purpose, for example if you want to build a telescope it would help you to find a good, dark spot for it.