The situation you describe sounds very comical. Since there were no other signs of aggression, the elephant was probably not antagonized or provoked. He ore she was probably being playful. However, elephants are highly intelligent. So there is a slight possibility that he or she understood that they were hot and was maybe cooling them off. But elephants, especially Asian elephants, love water.