I've been playing a lot of D&D lately. Or should I say, I've been playing a lot of D&D for me lately. After about a 15 year dry spell of no D&D I find myself running a bi-monthly campaign and playing in a separate one with random one shots to boot. I've also done Adventurer's League stuff at GenCon which is much like Pathfinder Society, just for D&D 5e.
I bring this up because when you look for builds or character concepts people have for these games there is this idea of making an optimal build. As if character creation is in and of itself a puzzle to figure out with a grading system based on how effective the character is at the end. This is strong enough in Pathfinder that - from what I have heard from people closely involved - some classes just aren't seen in Pathfinder Society play beyond a certain level because they don't bring enough to the table. At the same time, D&D 5e makes a point of minimizing sub-optimalness so that even though there will be a slight difference between an optimal build and a non-optimal one, it shouldn't be game breaking.
However, the question still remains. If you were to go into a D&D 5e game or a Pathfinder game right now, should you go for an optimal build or would you be free to go for the less optimal, but potentially more fun (or more desirable to you at that moment) "character" build. (Side note: I disagree that the choice is specifically Optimal vs. Character, full crunch builds can be wonderful characters too and vice versa.)
To me, the answer can be found in the answer to 3 questions.
1. What Does Your GM Say?
What does the GM say about the game? Is the game meant to be a number crunching, dungeon delving, combat fighting, loot-a-palooza? If so, there's nothing wrong with it. Sometimes GMs, and Players, just want to do an old fashioned dungeon crawl. Other times the GM is looking to do a more narrative and cinematic story in a custom world with home brewed plots. Some GMs don't like "min/max" or "munchkin" builds in their game and will tell you if you try to bring one in. Others thing the non-optimal builds are a waste of time, and they have things designed so you need every +1 you can find in order to get past some of the more difficult parts of the game. So ask your GM.
2. What Is Fun For You?
Be honest with yourself. What is fun for you? For a lot of people being effective in the game is the most fun. They love being the person to take down monsters, drop the 100+ damage round on the big bad boss, or to be the person succeeding on rolls while others are floundering around in half chances. Other people could care less about the mechanics of the game and just want a fun story. Still others are in between.
When it comes down to it, are you ok with being less effective in order to have the story or character points that you want? Think long term and build wise. Are you fine that you'll have to drop a feat slot into a stat bump to have the same Dex as the Elven Rogue? Is it ok with you that the 1/2 Orc is always going to be better at dishing out criticals or surviving huge blows from the race bonus on their tank? Will it bother you that a gnome has more flexibility in what spells they take because they get free cantrips?
If the answer to those questions is yes, then a non-optimal build may not be fore you.
3. Will The Game Allow Character Exploration?
First off, a good group will inject character into about everything. However, that doesn't mean that every game is ideal for character exploration. While I stand by that a good GM will make time for it, and a good group can do it regardless, some games just aren't cut out for digging deep into the characters. Some games are more about the events of what is going on, and don't have time for deep character moments.
Odds are if you have a new GM who is doing a book adventure/campaign the story will be more event focused than character. Why? Because that book adventure is designed to be character agnostic. Yes, again, a good GM can modify it to work in character - and that's why asking your GM is question #1) but not every GM is capable of pulling that off, or even interested in doing so. Sometimes a GM just wants to run Castle Ravenloft and not worry about fitting in personal hooks and connections.
Between those three questions you should have a good idea of if you can - or should - go for an optimal build or allow for less optimization to play what you want. Good luck. And have fun.