When the second serve is called 'out' and the ball is challenged, if the ball is actually 'in' then the server will get two serves again (unless, of course, the second serve would have been an ace - then the server would win the point). Think of it as replaying the point rather than replaying the second serve. If the same happens in a rally you don't replay the last few strokes, you replay the whole point. It's the same with (second) serves. Replaying the point means starting from the beginning, which means you get a first serve.
Yeah, it's still a silly rule at times though, last week in Basel a player hit a first serve in the net and it basically destroyed the tape in the middle, so it had to be replaced, after that happened he got another first serve.