I hate to be that guy to ruin a joke, but the two badges are actually explained in the anime. One's from the Pokemon School and one's from that test that Ash failed miserably. (remember: It's a Jigglypuff, seen from above!)

He didn't need them, (those badges are the equivalent of gym badges) he just got them because he's that good.