Curdled milk is not bad for you as long as the curdled milk is from fresh milk and not the result of spoiled milk.
if the milk curdled because it spoiled and went sour then that would be bad for you and could make you sick.
But curdled milk made from fresh milk is okay and safe to eat or drink.
For example cottage cheese is made from curdled milk and after draining, the curds are washed to remove residual acids, giving the cottage cheese a sweeter taste.
So if you've eaten any cottage cheese you've consumed curdled milk.
A chemical reaction is what causes milk to curdle whether in spoiled milk or fresh milk.
Curdled milk from fresh milk is safe to eat or drink while curdled milk from sour or spoiled milk is not safe to eat or drink.