Environmental factors such as temperature extremes, overcrowding, inadequate shelter or pasture conditions can contribute to dairy cows' stress and negatively impact their behavior. A comfortable and suitable environment is essential for maintaining good cow health and behavior.