The Townies are the ones who always start in the game, like the Goths, Landgraabs, Altos, etc. They will have the same traits in every game for everyone.
NPCs, such as maids, pizza delivery, burglars, etc. that start with the game will be the same and have the same traits. However, when new NPCs come into the game later, their traits can vary even with the same Sim. I've also had my Sim marry an NPC, game crashed, then when I played that part again, the NPC had a different trait. I believe he was a babysitter, so my Sim met him when he was a teen. In the first version, he aged up and got the Family Oriented trait. When I replayed it after the crash, he aged up and got the Evil trait.
As for the families who move to town after the start of the game, I think they're random. I've never seen the same family or name twice as far as I can remember.