One puzzling thing about Trump's recent attacks on mail-in ballots is that, prior to Trump's attacks on mailed ballots, it wasn't at all clear that vote by mail favored Democrats over Republicans. Just last year (before Trump started his anti-mail voting tirades) the Republican controlled legislature in Pennsylvania passed universal mail-in voting with pretty bipartisan support. (If you don't believe that just last year this was widely supported by Republicans just last year, check out this page from the PA Republican House caucus touting the vote-by-mail law) If anything, vote-by-mail was viewed as possibly favoring Republicans just because the two groups that most heavily rely upon vote-by-mail were members of the military and senior citizens with mobility issues, two demographics that leaned Republican.
So when Trump decided that vote by mail was a Democratic plot earlier this year, I chalked it up to the fact that he is a demented fucking idiot. There was no devious strategy behind it. Trump, once again, is probably shooting himself in the foot. He definitely created a self-fulfilling prophecy. With Trump claiming that mailed ballots are a Democratic plot to steal the election, Republican requests for mail-in ballots are way down and Democratic requests are way up, which is different from every prior year. But still, even just starting an anti-mail ballot backlash was seemed so dumb. Why raise questions about the validity of the military's (largely mailed-in) vote? Maybe this is why.