Randomly built binary search trees
Just to add on to the answer provided by @Yuval Filmus to further illustrate why the pair $Y_{i-1},Y_{n-i}$ should be independent on $Z_{n,i}$.

Here is what I got wrong:

From $Y_n = \sum_{i=1}^{n} Z_{n,i} (2\cdot max(Y_{i-1}, Y_{n-i}))$,  I had mistakenly thought that $i$ is a random variable. When I put this back into the definitions: $Z_{n,i}$ denotes the indicator random variable for the event that the rank of the root node is $i$.  $Y_{i-1}, Y_{i-1}$ denotes the exponential height of a randomly built binary search tree with $i$ elements and $i-1$ elements respectively. In this case, since $Z_{n,i}, Y_{i-1}, Y_{i-1}$ all dependent on this random variable $i$, I assumed that they must be dependent (through $i$).

Here is how I should have seen the equation above. By expanding out the summation:
$$Y_n = Z_{n,1} (2\cdot max(Y_{1-1}, Y_{n-1})) + Z_{n,2} (2\cdot max(Y_{2-1}, Y_{n-2})) + ... + Z_{n,n} (2\cdot max(Y_{n-1}, Y_{n-n}))$$

Thus, $i$ is just a variable and should not affect the independence between the pair $Y_{i-1},Y_{n-i}$ and $Z_{n,i}$. For instance in the first term $Z_{n,1} (2\cdot max(Y_{1-1}, Y_{n-1}))$, $Z_{n,1}$ denotes the indicator random variable for the event that the rank of the root node is 1. On the other hand, $Y_{1-1}, Y_{n-1}$ denotes the exponential height of a randomly built binary search tree with $0$ elements and $n-1$ elements respectively. Thus, from the definition alone, it should be clear that the pair $Y_{i-1},Y_{n-i}$ should not depend on $Z_{n,i}$.