Diagnostic procedure
Mazda 6 Service Manual: Scheduled Maintenance (U.S.A., Canada, and Puerto Rico)
Follow Schedule 1 if the vehicle is operated mainly where none of the following
conditions (severe driving conditions) apply.
Repeated short-distance driving
Driving in dusty conditions
Driving with extended use of brakes
Driving in areas where salt or other corrosive materials are used
...
Mazda 6 Service Manual: Locking, Unlocking the Doors
NOTE
The system may not operate if you are too close to the windows or door
handles.
If the key is left in the following areas and you leave the vehicle,
the doors may be locked depending on the radio wave conditions even if the key
is left in the vehicle.
Around the dashboard
...