Don't over think about the exhaust. The real reason FWD engines have exhaust in the front is because they are designed by 4 season countries. Mostly cold. So the heat would be spread to engine and defrost everything and engine could reach operating temp faster.
When cars reached Tropical climates, heat is a problem. So mounting larger radiator would solve the problem. Anyone who owned 1980s cars would know what exhaust heat intake for air filter is. Even the old 1980s Saga has the heat intake hole on the air filter.
Back then all cars had summer and winter modes. The design stuck on till today.
The other reason why exhausts are not made to face passenger cabin is because of fire hazard. You could read about melting shoes stories from 1970-1980s cars with such exhaust setup.
So the front extractor is a legacy design from way back when.
Why was it moved to the back then? and why the front design ia still being used?
Some people back then found out a short exhaust route created different power delivery. Also lesser metal used save cost?. Someone in Malaysia did that to a Waja engine many years ago. Said got improvement in power. And that engine is the most simple one to do, but needed new custom exhaust manifold. But that was long ago. Sometimes you get this,
Better power or not is debatable. When i was hanging out with Toyota 20V people time, engine tilting does create power. By adding shims to the engine mounts to tilt it. Much like how V engines angle 60 or 90 degree. Inline 4 Transverse FWD engine seems to have more benefit of tilt than an inline 4 longitunal RWD engine.
Dun think too much about exhaust being front or back of engine. The real magic is the whole exhaust from manifold to muffler.