You can use the formula you quote, but it seems you choose to use Bayesian estimation method that includes prior information in the statistical model. Those are two different ways of doing statistics. Check this question for learning more on what is Bayesian model.
Actually if you compute the likelihoods of different $p_i$'s you will find that they have the greatest peaks at $r_i/n_i$ points. On the plot below you see likelihood profiles for individual hospitals and the vertical lines are point estimates of $r_i/n_i$.

Notice that with using uninformative prior $\pi(\theta) = 1$ (or $Beta(1,1)$), then Bayesian estimates of $\pi(\theta|x) \propto f(x | \theta) \pi(\theta)$ are the same as with using likelihood-based approach, so the three approaches would lead to the same point estimates.
So using "something more" then $r_i/n_i$ is helpful for handling uncertainty of parameters as @jaradniemi noticed in comment. On another hand, more sophisticated approach could be used if (a) you wanted to build a hierarchical model where there is some general probability of failure and site-specyfic effects, or (b) you could use Bayesian approach to include some out-of-data information in your model as an informative prior.