marraige in mass

so when u get marriage to some one i know u dont have to change ur last name or anything will companys like dta ab mass health an stuff if u dont change ur last name an dont tell them. will they still know if ur married?? an what happens if u get married out of state. do u have to change everything right away once u do get married or can u wait?? can any state help like food stamps an stuff find out if ur married if u dont report it right away even if u get married out of state an dont change ur last name??