Guess what? BMW turbocharges practically every engine they make, so I'm guessing their engineers know more about this than you. I have one that actually has two turbos - specifically the 3.0L inline 6 twin turbo N54.
They aren't close to the engine for heat reasons - they are close to the engine because the turbo needs to be close to the air intake and exhaust at the same time, and that only happens at the engine. A turbocharger works by having the exhaust gases coming out of the engine at pressure (not heat, still mechanical work) spin a turbine which is connected to an air pump in the intake by a shaft. This spins VERY fast (150k RPM) so they also need to use a fluid bearing, so being close to the engine allows the use of engine oil as well.
It has nothing to do with heat, and everything to do with not having oil, air, and exhaust lines crisscrossing the whole fucking car.