You can't talk about a case if you don't have any details on it.
For all I know this kid could have been mal-nutritioned, starved, abused or abandoned home alone without a baby sitter while the mother was at work and etc.
If it was the case above, the kid would go into another family's custody regardless of immigration status.