I am going to have to borrow the opening passage from Bombieri, Friedlander, Iwaniec${}^*$ since they state this idea so well. In the following $\|f\|$ means $\big(\sum_{n\leqslant x} |f(n)|^2\big)^{1/2}$.
Given an arithmetic function $f(n)$, it is natural to study its distribution in residue classes $a\: (\text{mod }q)$. One focuses on the classes $a$ with $(a,q)=1$, without restricting the generality, and expects that among these classes a reasonable function $f$ will be uniformly distributed, such uniformity being measured by upper bounds for the magnitude of $$ \Delta_f(x;q,a) = \sum_{\substack{n\leqslant x, \\ n\equiv a(\text{mod }q)}} f(n) - \frac{1}{\phi(q)} \sum_{n\leqslant x, \\ (n,q)=1} f(n). $$ A not unreasonable goal is the estimate $$ \Delta_f(x;q,a) \ll \frac{1}{\phi(q)} (\log x)^{-A}x^{1/2} \|f\|, \qquad \qquad (1) $$ for any $A>0$, the implied constant depending only on $A$, the result valid uniformly in $q$ in a range as large as possible. In view of Cauchy's inequality it is natural to regard (1) as saving $(\log x)^A$ from the "trivial" estimate.
I have two queries.
1. Just a slight niggle. I only got $\ll \frac{1}{\sqrt{q}} x^{1/2} \|f\|$ for the "trivial" estimate using Cauchy's inequality. Is anyone able to get $\ll \frac{1}{\phi(q)} x^{1/2} \|f\|$?
2. More philosophically, how does one know when (or where does the intuition come from) that an estimate like (1) is actually true, or can be improved on? Normally my first instinct would be resort to some computations as a check that time isn't being wasted proving something that has an easy counterexample, but I cannot really see how this is done here. There are so many variables; one would presumably have to fix some $q$ and then let $x$ vary, then see what happens with different values of $q$ --- and this doesn't even take into account the infinite choices for $f$.
${}^*$ Primes in arithmetic progressions to large moduli, Acta Math. 156 (1986).