SugarCube's State system keeps track of every story variable ($) and its value in every moment (passage) in your story, and the save system saves those variables and only those variables. You can turn the history tracking off, but you'll lose the ability to go back and forward in the story. Variables that aren't story variables are not tracked by the State system, are not saved, and are not adjusted by history navigation.
As to why you'd want to do this, it's mostly because tracking those variables can (eventually) have a performance cost as stories grow, so it's a good habit to be in, and it keeps your saved data small, which can be important on mobile devices with limited browser storage.
I don't want to overblow the performance or saved data size benefits, it is negligible for most stories. I just think it's a safer way to do things. When in doubt, though, use story variables; it's generally less of a pain to track something you don't need than to need something you didn't track.