Assume that $Y_1, Y_2, ..., Y_{100}$, are the rounding errors made on one hundred items and that these are independent and uniformly distributed over the interval $[−50(\text{USD}), 50(\text{USD})]$.
By the distribution assumption made for each $Y_i$, $E(Y_i)=0$ for $i =1,2,...,100$
Why is $E(Y_i)=0$?
No, not quite. What you have provided in the comments is the density. For simplicity, $Y_i = X$, and what you have given is $$f_X(x) = \frac{1}{b-a} = \frac{1}{100}.$$
Then to find the expectation, we follow the usual formula $$E[X] =\int_{-50}^{50} x\cdot f_X(x)\,dx = \int_{-50}^{50}x\cdot\frac{1}{100}\,dx = 0.$$
Somewhere along the way, you were probably given that for a random variable $X$, if it follows $\text{unif}[a,b]$, then $$E[X] = \frac{a+b}{2}.$$
You can verify this. It also gives the same result, $E[X] = \frac{-50+50}{2} = 0$.
Addendum:
In the case that it follows a discrete uniform distribution, $P(X = k)$ for some $k$ in $[-50, \dotsc,50]$ is $\frac{1}{101}$. So using the usual formula for discrete cases, we have $$\sum_{k = -50}^{50} kP(X=k) = 0.$$
You can verify that $E[X] = \frac{a+b}{2}$ for the discrete case too.