There really isn't any dicotomy here.
Roleplaying your character (as in portraying their personality, goals and so on) is pretty much orthogonal to character optimisation. Whether my character has a +5 or +7 to hit has pretty much nothing to do with how likely they are to stand up and make a...