The states' rights narrative isn't recent, but my understanding is that it's a very selective reading of history that ignores many of the stated rationales and events leading up to and throughout the war. Yes, war is complicated and slavery wasn't the
only factor, but I understand it to have been the predominant one.
Remember that the back-and-forth over federalism and states' rights has been ongoing since forever, and the same people tend to be on opposite sides of that question depending on the matter in question. Thus it's reasonable to ask: states' rights to do what? In the context of that time, the answer was clear.
It does make for a nice fairy tale, though, for whitewashing the past, and it's one someone might believe because their parents told them, and their grandparents told their parents, etc., all the way back to the vanquished generation rationalizing their conduct post-hoc, much as many Nazis did after World War II.
I'm no historian, so take with 0.017 mol NaCl.