skeletons have brains?

.....Going through rhe Underdark, we encountered a couple of mind flayers. We retreated, then sent some skeletal warriors in their direction. Now this worked fine for me before in the sewers of Athkatla; the mind flayers were defeated. However, the mind flayers in the Underdark are seemingly made from sterner stuff. They killed off my skeletal warriors using their devour brain ability.
.....I was a bit taken aback, as skeletal warriors have no fleshy parts left; their brains turned to dust a while ago. The only way I can think of to explain this anomaly is to conclude that this portion of Shadows of Ahm was coded by someone else. They apparently decided that since skeletal warriors were able to follow simple comands (move, attack), they had enough of a mind to be subject to that type of attack. Seems a bit odd to me.
.....I was a bit taken aback, as skeletal warriors have no fleshy parts left; their brains turned to dust a while ago. The only way I can think of to explain this anomaly is to conclude that this portion of Shadows of Ahm was coded by someone else. They apparently decided that since skeletal warriors were able to follow simple comands (move, attack), they had enough of a mind to be subject to that type of attack. Seems a bit odd to me.

0
Comments
It’s really a BG2-homebrew mechanic, so interpretation is open. If you treat it as the flayers numbing or paralyzing the target’s mind psionically, then sure — that could affect undead as well, since many of them have minds. But it shouldn’t kill them; it would just render them unresponsive until the effect ended.
That said, skeletons are supposed to be immune to psionics.
So in practice, the problem should never arise.
What they aren't immune to is the intelligence drain from mind flayer melee attacks. Fortunately, they have 16 INT so it takes four hits, and decent AC. Standard mind flayers have THAC0 15, against AC 2 for the highest level skeleton warrior summons. So they hit on 13 or better, with 4 APR ... expect it to take about three rounds for a mind flayer to take down a skeleton, if it doesn't get distracted with useless psionic attacks. On the flip side, the skeleton gets 2 APR at effective THAC0 4 and damage 1d10+9 against the mind flayer's AC 5 and 68 HP. That's about two and a half rounds to bring down. In a one on one match between a skeleton warrior summon (at caster level 15+) and a standard mind flayer, the skeleton should win more often than not.
So it comes down to numbers. You might have just had more skeletons relative to the mind flayer numbers back in Athkatla. They're not any different as creatures. Every "Mind Flayer" you fight has the exact same combat script.