That functionality has already been added
There is an option to "remove groups" or not to. If you set it to yes, TS users will only be assinged the groups that they have on the forum, so any additional groups they may have will be removed. If set to no, groups will never be removed from TS, so if they had additinal groups they won't be removed only new ones assigned.
It is not stored in profile fields, it's stored in the database and is only shown to the user. But I think @Valthos is referring to situations where a forum does get hacked or something similar.