This is a bug. You did nothing wrong!! Do you know how to use the cheats window? You'll need to use a cheat to fix it.
Ctrl+shift+c brings up the cheats window. Then type in testingcheatsenabled true. Then shift+click on your affected sim, then Modify Traits. You can then add in the trait that you selected (or a different trait, if that's what you so desire). When you've finished, you can turn off the cheat by bringing up the cheat window again, then type testingcheatsenabled false.