Resistances as well. How in the nine hells do we know about their resistances? Just scroll over and choose the less resistant target with your spell. You just know this, because tadpole.
It's called an abstraction.
You see you theretically could create a game, that would fully symulate things like damage - perhaps every character model would have bloodvessels and with every every strike of the sword cuts would be tracked, blood would spill, and character would bleed out in simulated way.
But that would be difficult to do, and not very fun to engage with. Not in a game, not focused on cutting things to pieces at least.
Therefore - abstraction! We represent character wellbeing with HP. Each strike decresses HP. When HP goes to 0 the character is dead! So instead of finding tricky way of communicating how injured the create is, one can say: this create has 2HP out of 10HP total, and the player can easily translate it to: "This create is very hurt!". We can do it with numbers, we can do it with health bars. Pick your poison, it doesn't really matter.
Same applies with resistances, and AC etc. And sure, perhaps ideally, devs could find ways to communicate those information in diegetic way (I am always a big fan of that), but the more stuff there is in the game, the harder it is to do. So an abstracted number and dice roll will do!
If, on the other hand, you just meant to criticise how tactically shallow DnD is, and that if players understand how system works there isn't much actual choice in how to proceed - you are right, it is not a very good system from gameplay perspecitve. But I never felt DnD was about being good gameplay wise - BG1&2 certainly weren't. It's about an ability to create adventures, and having systems which will give expression to various characters and creatures. If the game says: this character has high dex and will dodge your physical attacks, but will easily succumb to will attacks - yeah, that's not tactically interesting, but it's doing what it was designed to do. A DM might use numbers to spin a tale, but a cRPG is limited in that regard - so they will just show you enemy stats, and let visuals and your imagination to the storytelling. Not communicating that this enemy is agile, doesn't help in defining this enemy, which is worse, then simply showing you stats.