My daughter age 3 when she drink un boiled water she feel ill and direaha why?

Unboiled water. There may be a contaminant in the unsterile water that causes her diarrhea. The boiling kills off the probable germ that is lresent in the water.