There is a long history of elephants in India being kit by trains. As funny as the photo looks, its actually very dangerous for the animals. I believe elephants are barred from roaming around trains in Thailand for this reason. Thai trains have strict speed limits when traveling through elephant country. India, does not do this.
Cows on the other hand are a different story. They tend to free-range and are hit frequently enough that Thai engineers have a cash box in the cab to pay the owners for any that are hit. One of my trains down to Hat Yai was delayed for about 40 minutes due to such an incident.