If you want me to be legit serious, no it was not an accident. You purposefully traded it. JK JK
But if you want a more advanced opinion, I can say that it goes two ways. On the first hand, keeping shinies is like making a collection. You just keep them all because they are freakign awesome. But on the other hand, you do need both Black2 and WHite 2 to get Regigigas so it was useful if you don't want the hassle of having both games or trying to get a Regice/Regirock( which is harder to trade for than Regigigas). There are the technicals.
From my opinion, you can always get more Skorupi (in Reversal Mountain) for breeding but if you wanted the shiny, then I feel your loss and I can say it was a mistake. (And just so you know, I traded my first shiny for a legendary, and I regret it now too, so it happens to the best of us)