The word "wiener" came to mean, well, a man's wiener, through its association with a type of sausage from Vienna, the Wiener Würstchen. The German word for Vienna is Wien, pronounced "veen," and Viennese is Wiener, pronounced "veener." In the same way people say "Polish" for Polish sausage, people started calling the wiener wurst a "weener," and the word then traveled over to the domain of other sausage-like objects.
But Anthony Weiner's name is not Wiener! It is spelled with "ei" rather than "ie," and in German, "ei" is pronounced "eye," as it would be in "whiner." So why doesn't he use that pronunciation? What sort of glutton for punishment is he?
If he lived in Germany, his name would indeed have the "eye" pronunciation but in the United States both the "eye" and "ee" pronunciations show up for this name, for reasons having to do with ethnicity, sound drift, and chance. There is a German name Weiner that comes from a dialectal pronunciation of Wagner, related to Waggoner, meaning wagon-maker. But Anthony Weiner is Jewish, and according to dictionaries of Jewish surnames, his name probably originates from the Yiddish name Vayner, meaning wine merchant. Yiddish is related to German, and Vayner is related to the German word Wein for "wine," and pronounced with the "eye" vowel. But there is another less common but also predominately Jewish surname Wiener, meaning someone who comes from Vienna.
So there have long been two surnames with two pronunciations and two different but very close spellings floating about in the same American community, and in the process of Americanization things were likely to get mixed up. Probably adding to the confusion was influence from the inconsistent "ie" "ei" spelling rules in English, and a slew of common American Scottish names where "ei" stood for the "ee" sound (MacLeish, Neil, Reid, Weir, Keith).
Of course, in the American tradition, it's up to each family to decide how they want to spell and pronounce their name. If Anthony Weiner wants to reinvent himself again, he could always consider a name change.