Just in case anyone hasn't seen it yet I'll do this in white-text. Here's my take:-
The fantasy world was created by the real Gene Hunt as he died, in the first week of his police career in 1952. Because he died so full of ego and bravado his consciousness simply didn't accept his life was over, so it created a little bubble of purgatory. Although it's a delusion it has a power to it that means others can reach it. Dead police officers with unfinished issues are attracted to it, and those close to death also fall into it and give it more power. The setting is completely populated from the memories of those who live within, but the memories are flawed. Hence Ben Elton dying, the huge numbers of guns on the streets of London, the way events don't quite fall into line with the real world.
It looked like the real Ray died in the late 70s, and real Shaz in the mid 90s from the Oasis soundtrack. Combined with the memories of Sam and Alex that's plenty to give the 1973 and 1982 settings a depth that Hunt himself would never have been able to supply. Not sure about Chris's timeline, although it would be ironic if it turned out that he's older than everyone except Gene.
Keats appeared this series because Alex died in the real world at the end of Series 2. I think that without a connection to a living consciousness the fantasy world gets weaker. This not only means that Keats can get in and start influencing events, but the inhabitants can also break through the walls themselves. Notice how they frequently saw or heard things following a row with Gene Hunt. Possibly when the link between them and Hunt was weak they became more aware that they weren't in a true reality.
Hunt forgets that he's really dead unless he's reminded of it, such as when Sam Tyler's jacket appeared. Although he instinctively wants to guide his dead colleagues away from the "Dark Side" he also wants them to stay with him. He's both a hero and a tragic lonely young policeman simultaneously. The young Gene part of him is afraid of what comes next, but also does not want his short real life to have meant nothing. I liked that fact that the writers didn't expose Hunt as an angel or anything that rubbish. His created purpose was to keep the bad guy away from those in his care, not to be the forces of good. He was the Town Sheriff, the Blue Line. He just had to protect people until they found their own way.
So why were Alex and Sam different from Ray, Chris et al? Sam is obvious, he wasn't dead at all, and Alex started off in the world alive. It's significant that her outside influences changed in this series. Instead of hearing Molly or the voices of hospital staff her visions were far more associated with death. If another "live soul" had entered the world during that time she possibly would have forgotten the real world as the others did. Instead Keats was able to guide her into discovering the truth before her link with reality disappeared, leading Hunt to full realisation of not just his own death but the way he had prevented Chris, Ray and Shaz from moving on. In the end though, this act and knowledge gave him sufficient power to drive Keats out (again?).
Anyways, I thought it was very moving 🙂