I believe Alfred did leave Bruce sometime after Knightfall. Becuase he saw that Bruce seemed to be disregarding his own health and safety. Which is how Bane defeated him in the comics.
While Bane attacked him in the Batcave by surprise. He was too stuburn to seek help with the escaped Arkham inmates. So he was in a weakened state when Batman struck.
The film is very similar to the comics.