Every system has a 'system number', between 0 and the designated system # max for the game. (Real stars doesnt accept system max limits.) When you enter a jumppoint, the game makes a roll to pick a system number. If its a currently unused #, it generates a new system and connects you to a jump point in it. If it's the number of an existing system, it connects you to a jump point in it- unless there are no available jump points, in which case it generates a new jump point. If enemy ships show up where none should be, you may need to re-survey that system (using the function in the f9 screen to erase your existing survey progress. You get to keep the location of already-known jump points.)
So, as more systems get explored in a game, there's less and less unexplored system #s and therefore an increasing likelihood of connecting to an existing system with a 'closed' jump point.
There's a bias towards unexplored systems when it picks a number though, IIRC.