Those evs are a hangover from last gen, if I am not mistaken I believe they allow it to take thunderbolts from Rotom-A better.
They are still a bit relevant, having some special defense makes it easier to take volt-switches from our more offensive Rotom-W in this metagame (I believe its avoids a 2HKO from it after rocks), although I do think that they need a tune up for this generation. Also having less defense evs make it harder for Forretress to take hits from Landorus in the sand and Landorus-T, so maybe that should be considered.
I am not Scarf Wynaut on Pokemon Showdown. I am PrincesoBubblegum