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:
Are functions of independent variables also independent?
But by this answer the covariance is not zero:
What is cov(X,Y), where X=min(U,V) and Y=max(U,V) for independent uniform(0,1) variables U and V?
How do I reconcile these two things? The $\min$ and $\max$ are a function of independent random variables, yet they have covariance.