If the theft-deterrent system detects an inappropriate entry into the vehicle, which could result in the vehicle or its contents being stolen, the alarm alerts the surrounding area of an abnormality by sounding the horn and flashing the hazard warning lights.
The system will not function unless it's properly armed. So when you leave the vehicle, follow the arming procedure correctly.
Mazda 6 Owners Manual: No.2 neither abs warning light nor brake system warning lightilluminate with
ignition switch on
When performing an asterisked (*) troubleshooting inspection, shake the
wiring harness and connectors while doing the inspection to discover whether
poor contact points are the cause of any intermittent malfunction. If there
is a problem, check to make sure connectors, terminals and ...
Mazda 6 Owners Manual: Dtc b1318
Caution
When attaching the tester lead to the ABS (ABS/TCS) HU/CM harness
connector, the SST (49 G066 001) must be used. (See ABS (ABS/TCS) HU/CM
INSPECTION.)
Diagnostic procedure
...