They set it up for the past two films. Bruce wanted out. He thought Harvey was the key for him and rachel. Rachel died, dent became two face. The only way Gotham wouldnt need Batman was for Dents action to stand, become the Dent act and Batman to become a criminal.
Bruce couldnt move on from Rachel believing she was waiting for Bruce when the truth is she chose Harvey because Bruce will always need Batman.
Alfred always dreamt when Bruce left the first time, he would see him across the table, with a family living the life he always wanted Bruce to have, because in Gotham City he would never have that. He would never escape his surname, he would never escape the fact his parents were murdered. Every corner he turned his parents ghosts would be with him in his mind.
Away from gotham, Bruce can move on, live the life his family wouldve wanted, the life Alfred wanted.
When Alfred said in BB that they left him in charge of the thing that his parents thought most precious, it wasnt the Mansion. it was Bruce. Can nobody not see that? 'Know your limits', 'thought you was helping people not damn good television', 'youve got a name to uphold', then alfreds speech about saving bruce the pain of knowing that his escape route from Batman was just Bruces fantasy, sparing him the pain of knowing that he wouldnt have a route out, and the only way is what Bruce ended up wanting; to die the hero after becoming the villain.
Bruce realised this, Bruce realised that saving Gotham, rising up batman as the legend, Bane gave the city to the people, and the good people took it back. No corruption anymore, the mob is non existent almost. Gotham doesn need BRUCE as Batman anymore. Selina wanted a way out, she wanted to change. The two connected, the two fought along side and Selina became bruces' escape, Bruce became Seleina's escape.
Bruce remembered exactly what Alfred said; he thought Bruce was dead. He thought he failed Thomas and Martha. Instead, he succeeded; Bruces message to Alfred was exactly what Alfred wanted it to be, It was a message to Alfred that he is moving on now, he is ok, he has Selina and one day a family.
Its not a dream, its not Inception. Its a happy ending, which is rare for Batman after you look in the comics at Silver st Cloud for example. But this film is an End. This is an end that I have wanted for Bruce Wayne since reading comics, but comics would never end. They will always continue to punish Bruce Wayne as batman until he dies. Which is why the ending for me is the most powerful it could be; Because Bruce is happy. Nobody ever has Bruce happy, Nobody has bruce fought his demons. This has. Everytime he starts happiness it comes crashing down but finally.... Bruce can have a happy life. I think some cant accept that of Batman and expects the story to just have him go on and on and on. Idve loved another film or so, but the ending was perfect for me because thats what it was, an ending. Batman doesnt have endings.