The cow would be consuming 80 gallons of water during a hot day. If on any day the cow drinks 40 gallons on a hot day it drinks double the amount so you multiply them by 2 and its 80. I hope this answer can help you.
The literary device used in these lines is Personification.
The personification is a figure of speech in which a thing is given human attributes. The non-human objects are portrayed in such a way that we feel they have the capacity to act like human beings. This device makes the piece more interesting to read and makes it more sensitive to the reader.
Probably because he wanted to inspire people around the world for the greater good of the world.