Linearity of expectation is (sometimes surprisingly) always valid.
If I roll two dice then the expected value of the first is $3.5$ and the exopected value of the second is $3.5$ and the expected value of the sum is $7$. Now you'll say "Sure, that's cause they are independent." But now do this:
I roll the first die and then manually place the second die so that it shows the same number. Again each die has an expected value of $3.5$ and the sum has an expected value of $7$.
Or I roll a first die and then I manually place the second die so that it shows one more than the first (in a cyclic sense, that is if the first shows "6" I set the second to "1"). Again each die has an expected value of $3.5$ and the sum has an expected value of $7$.
Just note that
$$\begin{align}E[\alpha X+\beta Y]&=\sum_{i,j}P(X=x_i, Y=y_j)(\alpha x_i+\beta y_j)\\&=\sum_i\alpha x_i\sum_jP(X=x_i,Y=y_j)+\sum_j\beta y_j\sum_iP(X=x_i,Y=y_j) \\&= \alpha \sum_ix_iP(X=x_i)+ \beta \sum_jy_jP(Y=y_j)\\&=\alpha E[X]+\beta E[Y]\end{align}$$
Now why your simulation differs from your computation:
For a single man $i$ ("Jack", say) the expected value of his $X_i$ is
$$\begin{align}E[X_i]&=\operatorname{Pr}(X_i=1)\\&=1-\operatorname{Pr}(X_i=0)\\&=1-\left(\frac{2}{80}\cdot \frac{49}{79}+\frac{78}{80}\cdot \frac{49}{79}\cdot\frac{48}{78}\right)\\&=\frac{154041}{249640} \end{align}$$
and this is the same for all $i$; note that we cannot split end men and middle men in the final sum because we don't know beforehand how many end men there will be. Instead we subsumize the possibility of being at an end or not alreday in the expected value for each single man. Either Jack ends up at an end or he does not; since these are mutually exclusive, we added the probabilities in the parenthesis.
Because there is no distinction among the men, we have $E[X_1]=\ldots=E[X_{50}]$ and hence
$$E[Y]=50\cdot \frac{154041}{249640}=\frac{770205}{24964}\approx 30.85$$
which is much better in accordance with your simulation (though you didn't specify the observed variance, which could have hinted to the quality of the simulated result).