Why do cows wear bells?

Their horns don't work.