IIRC, Apple used to have the ambient light sensor under the left speaker grille. If you happened to rest your hand there, it would make your screen suddenly start dimming.
When using the laptop in a dark environment, it was also prone to a feedback loop where the screen dimming would result in less light hitting the sensor, leading to further screen dimming, or runaway brightening. Putting the sensor facing outward from the plane of the screen minimizes that feedback.
When using the laptop in a dark environment, it was also prone to a feedback loop where the screen dimming would result in less light hitting the sensor, leading to further screen dimming, or runaway brightening. Putting the sensor facing outward from the plane of the screen minimizes that feedback.