For the US, the 3 series is made in several plants in Germany or the South African plant. In SA, they primarily manufacture the globally distributed N51 SULEV vehicles, which are the mass market cars for general dealer allocation. As such, the majority of the base model cars with the "value package" came from SA when I was looking to get my 2011.
Almost all custom 3's come off the Munich line while almost all others come from plants located in more industrialized cities. The Chinese plant is strictly for that market and does not come here or go to Europe. I insisted on a Germany car myself and waited for an available port swap.
Many of the initial build quality issues have been traced to the SA cars, once they get a few thousand miles and a couple work orders behind them, they make for good cars to drive down BMW's CAFE ratings.