Sometimes wiring issues can actually generate a DC offset that will cause the bell to ring or the horn to blow. Also, we don't know what other devices are connected to the track, a device that rectifies track current with a single diode and draws power will impart a DC offset on the track.
Finally, the locomotive could just have a problem, it happens.