There are two major components to archery: form and concentration. When some component of form breaks down, or we lose our concentration on a shot, then we miss. After the shot is over, most of the time all we know is that we missed, and then we begin to guess why. If you sometimes shoot better at 20 yards than you do at 10 yards, I would guess that you are concentrating on your spot more at 20 yards than you are at 10 yards, since it is further away. That's all it is though, is a guess.
Sometime if you're not shooting as well at 10 yards as you think you should, really engage your mind on the next shot and focus on the spot you want to hit. If your shooting improves, then maybe my guess was correct.