Honestly it felt that both BG1 and 2 were never play tested by people who either didn’t design the encounters or used dev mode cheats (or quite possibly both).
Many of the core story encounters were out right unbeatable on first attempt unless you’ve intentionally out leveled them by doing every possible side encounter (many which you probably needed multiple play troughs to discover in the first place) and even then not every encounter was outlevelable.
Yeah, I mean I was leveled and equipped to the max (like, just about literally, I'd maxed out the level cap and my equipment might not have been mathematically perfect if you're an "ok let's make a spreadsheet" sort, but it was very well-optimized) both(!) times I've beaten the game, and had learned the game's mechanics really well, and I still don't think beating that final encounter was possible without losing it at least once (or otherwise learning how it goes outside the game) and not only that, but then cheesing it at least a bit by getting in a couple unfair hits.
And especially early on... like lots of mundane encounters will just wreck you in about two turns if you don't know in advance what's about to happen, you don't even get time to react to what's going on before you're either dead or too messed-up to realistically recover even with perfect play from then on. The game's very harsh at early levels, and remains that way for any of the "major" encounters for the entire game.
Yeah, I still remember that side mission in BG2, where you enter some castle that got taken over by demon lords or some such and in the lowest level you fight the demon prince or something. I wasn't even able to dent that guy, because even after every single magic resistance breaker spell, almost nothing got through. I guess one time in maybe 20 times loading a savegame I was able to deal a little bit of damage, and then never again.
Then I watched a video about someone beating that and somehow it seemed soooo easy how they did it. Later in that video, for a short time I was able to see the attributes of their characters... Somehow every one of them had like +4 to +6 on their attributes, compared to my characters, lol. I guess no wonder their die rolls were so much more successful. And then I wondered why they have soooo much better stats. Turned out they imported their characters from BG1, and I simply made new ones in BG2. I was pissed. Never beaten that demon prince.
And then the final boss in the expansion of BG2 ... Somehow she was almost unhittable and her friggin golems too strong. The only way I was able to deal good damage was with my main, a monk without armor, and with Imoen's traps. But I didn't have enough traps ... Never managed to beat the boss, even after grinding some more, outside that building, with the randomly appearing enemies and rising some 2-4 levels.