Some unit types come with preconfigured traits. Sometimes these traits are not wanted. For example, GM special forces units have basically every trait regardless of their role.
assignGear should clear all traits to start with, so the unit ends up only having the traits granted by its assignGear class.