Suppose $X_1, X_2$ are independent $U(0, 1)$ random variables, and
$$Y = \min(X_1, X_2) $$ $$Z = \max(X_1, X_2) $$
By this question, they $Y$ and $Z$ should be independent:
But by this answer the covariance is not zero:
How do I reconcile these two things? The $\min$ and $\max$ are a function of independent random variables, yet they have covariance.