Birds on power lines don't get shocked because they are not in contact with the ground or other conductive element that is in contact with the ground. If the bird were to touch another wire at the same time, and that second wire was of a differing resistance, it could be electrocuted.