This is not a complete answer, but not quite a comment either.

One clarification to begin:

As I understand it the example with density $\sqrt{n}$ (Sidon) is not one where I find
$a(n)$ and $r(n)$ rather unrelated; perhaps I am thus missing your point.

Let me elaborate why I find them quite related: the sum of two elements in $[1,n]$
will be in $[1,2n]$, with the $a(n)$ elements of $A$ in $[1,n]$ one can form about
$a(n)^2/2$ sums.
So if $a(n)$ is about $\sqrt{n}$ then in fact I expect (as a first heuristic) that no elment has more than $1$ representation, as for the $2n$ elements I only have about $n/2$ sums.

An example where I find them very unrelated is say all $n$ congruent $1$ modulo $3$ and $h=2$, then $a(n)$ is $n/3$ but still for some $n$ there is no representation while others have plenty of representations.

With my interpretation, I would say one property that tends to make them related is little additive structure in $A$, so more or less 'random' sets. Where by related I mean that the number of representations of each element is close to the one that one expects from the above counting/averaging argument and suitable generalizations.

In contrast, if there is some $M$ such that modulo $M$ the set $A$ is very unevenly distributed, then this will bias the representation function to be large/small on certain congruence classes modulo $M$.

A result due to Kneser roughly says that the number of elements with no representation is unexpectedly small (in a precise sense) if and only if the set is extremely badly distributed modulo some $M$.

Perhaps I should add that for the primes, as far as I know the standard assumption is, that in fact they behave, regarding this type of questions, like a random set with the appropriate desity, except for some bias comming from the fact that all but one prime is odd, all but one is not divisible by $3$ and so on. In fact, it is this assumption that is the foundation for various conjectures on the distribution of primes; in some cases it is possible to make this heuristic precise and to prove results in this direction.