Your droid comes with a permanent personality type when minted, and this personality type can never be changed. It's the ghost in the machine - the unexplainable reason why all droids behave differently. What personality works best for what task is something you'll have to experiment with. There are seven personality types in total:
Different droid models have different rarity levels in terms of personality types. For example: Special Ops archetypes are more likely to be brawlers, whereas Assassin archetypes are more likely to be rogues. Some personalities are better than other on certain tasks and missions.