Ryback losing doesn't mean the buildup is wasted. It just means he can't beat the top guy in the WWE. He can look strong in defeat.
Ryback beating CM Punk would be kinda interesting and out there, but I wouldn't like it because I doubt Ryback has what it takes to put on the kind of long matches required for a WWE Champion, at least not right now. Ryback facing a top guy at Wrestlemania is even more ridiculous; he's definitely not ready for such a spot.