I've wondered this myself- people have asked me if that's what China really is like because I'm Chinese American and it's always embarrassed me. I have family in Beijing and a few smaller cities in China and even the worst areas in those places are all cleaner, and certainly less crowded and smellier than the Chinatowns I've seen in the US (Manhattan, Queens, and San Francisco.)
Honestly I'd say it's because the new (often illegal) immigrants that populate these areas are mostly from poor backwaters of China (or other South East Asian countries). As a native Mandarin speaker most of the dialects I hear in those areas are not Mandarin or Cantonese. Most people speak regional dialects and when they do speak Mandarin they speak it with very "country" accents, which, in China is how you can tell how sophisticated or unsophisticated someone is.
I'd assume people from the prosperous cities of China usually are not willing to pay tens of thousands of dollars to be smuggled into the US to do menial work for sub minimum wage.