The original plan for Hell in a Cell was to have Ryback pin CM Punk clean and win the WWE title. He would have held the belt through Survivor Series and then lost it in a multi-man gimmick match at TLC where he wouldn't have to be pinned or submitted. This would have allowed the streak to continue. Vince McMahon had settled on this plan on October 25, just three days before the PPV.
Then the next day, Vince decided to keep the belt on CM Punk because he felt Punk's long title reign was more important than Ryback's undefeated streak, which isn't necessary to play him up as a monster. WWE has spent so much time focusing on Punk's title reign that they felt it would be better to keep the belt on him until the Royal Rumble so his match with The Rock will have higher stakes.
Once the decision was made to keep the belt on Punk, WWE then tried to come up with ways for Ryback to lose without looking weak. WWE considered several options before going with crooked referee Brad Maddox. Several ideas brought up included run-ins from Brock Lesnar, Big Show, Mark Henry and even Vince McMahon himself.