Due to the movement of electrons from the ground to the tyres, the tyres of the truck moving on the ground acquire a negative charge due to friction. The body of the truck which is of metal gets positively charged by induction. The negative charge on the tyres and the positive charge on the body may cause sparking which may ignite the petrol and cause fire. The metal chain dangling to the ground neutralises the positive charge of the body of the truck by electrons coming through it from the ground and thus the danger of any sparking is avoided.