Diarrhea in goats can be caused by a variety of factors, including dietary changes, infections, parasites, and stress. Sudden shifts in diet, such as introducing new feeds or forages, can disrupt the goat's digestive system, leading to loose stools. Additionally, bacteria, viruses, and parasites like coccidia and worms can infect the gastrointestinal tract, causing inflammation and resulting in diarrhea.