M.B.
Long ago, when my kids were little, they used to say that if an infant/toddler pulled at or rubbed their ears they might have an ear infection.... (my children were born in the 80's, and one in 1991.... so you know how long ago that info is coming from!)
However, when my kids cried, they tended to rub or hit at their ears! I think it is just where their hands happened to hit......
I really think that sometimes as they cry, their hands/arms flail about, and out of frustration, they just grab onto whatever is nearby.....