The High Beam Control System (HBC) operates to switch the headlights automatically between high and low beams after the ignition is switched ON and the headlight switch is in the AUTO and high beam position.
The High Beam Control System (HBC) determines that it is dark based on the brightness of the surrounding area. At the same time, the High Beam Control System (HBC) indicator light (green) in the instrument cluster illuminates.

NOTE
When the vehicle speed is less than about 20 km/h (12 mph), the High Beam Control System (HBC) switches the headlights to low beams.
High Beam Control System (HBC) (Some models)
Manual SwitchingMazda 6 Owners Manual: Cargo compartment light switch inspection
1. Remove the liftgate lower trim. (See LIFTGATE LOWER TRIM
REMOVAL/INSTALLATION)
2. Disconnect the cargo compartment light switch connector.
3. Inspect for continuity between the cargo compartment light switch
terminals using an ohmmeter.
If not as specified, replace the liftgate lock.
...
Mazda 6 Owners Manual: Curtain Air Bags
The curtain air bags are mounted in the front and rear window pillars, and the
roof edge along both sides.
When the air bag crash sensors detect a side impact of greater than moderate
force, the curtain air bag inflates quickly and helps to reduce injury mainly to
the rear outboard passenger' ...