There are two types of how variables can be redefined in sass:

- Simple redefinition by assigning the value after initial assignment
- "Lazy" definition, in case if value of variable was not defined previously, otherwise current definition statement is skipped. Special syntax exists for this option, it is "!default"

Example of common way of overriding variable value in sass:
$main-bg: #d1d1d1;
$main-bg: lighten($main-bg, 0.3);

body {
    background-color: $main-bg; //color value will be #d2d2d2; here, because $main-bg value was overridden.

}
Example of using "!default" to avoid overriding value of variable which already has a non-null value:
$main-bg: #d1d1d1;
$main-bg: lighten($main-bg, 0.3) !default;

body {
    background-color: $main-bg; //color value will still remain #d1d1d1, because "!default" flag never overrides non-null value

}
But still "!default" treats "null" value as value which has to be overwritten:
$main-bg: null;
$main-bg: lighten(#d1d1d1, 0.3) !default;

body {
    background-color: $main-bg; //#d2d2d2 will be the value of color here

}

It is better to be very careful when you define your sass variables with "!default", because your value will not apply if you will get variable name collisions after importing some sass framework into your code before your variable declaration.

From other side if you develop some css library with sass, it can be a nice option to declare you variables with "!default" flag, which will prevent you framework to redefine sass variables of client programmer in case if he will import your library after his own variable declarations.