The factories causing trouble for Beijing are not that far from the city. If the weather was always favorable, or if there were a mountain range in the way, it wouldn't be as bad. But sometimes when the wind is right, the smog settles under the city's temperature inversion and you pretty much have to wait for a rainstorm to clear it out.
If we removed regulations and built the same dirty factories in the USA, it might not cause the same problems if we put them in better locations.