One motivation I have seen given for Ramanujan's conjecture for the estimate $$ |a_p|< C p^{k - \frac{1}{2}} $$ for the Fourier coefficients of a cusp form of weight $2k$ is that it allows one to show that the error term in some formulas for the number of representation of a number by a certain quadratic form (which comes from a cusp form) is dominated by the main term. However, at least in applications in Serre's "a course in arithmetic", it seems that even the Hecke estimate suffices. I know that this is not the case for some more recent applications (say, construction of Ramanujan graphs, `a la Lubotzky-Philip-Sarnak), but these could have hardly been Ramanujan's motivation.
I would like to know what was Ramanujan's original motivation for making this conjecture, and also a hint as to how he may have come up with the $1/2$ power saving term. This question came up in a course on analytic number theory I taught this semester. ANT is not my field of research, so I'd not be surprised if the answer to this question turns out to be well-known or even trivial. I will still appreciate it if an expert could respond or provide a reference.