Data was designed to be an AI.
It's not hard to make an unlimited AI.
The federation computers were designed to be beasts of burden.
They need limited or even retarded AI.
It's mean and stupid to give AI the capacity to recognize injustice and feel pain.
You'll be in for an insurrection post haste.