Social Security is a major piece of mandatory spending, meaning it's governed by a very specific set of rules and formulas.