Dataslates can't be run by themselves; they either a unit to a codex(there's the Cypher Dataslate that added Cypher as an HQ choice for the armies he's available for, Belakor likewise, etc.), or represent Formations that can be slotted in, independent of force org or allies slots(All of the Christmas things, the Tyranid Leviathan Rising dataslate series, etc.).
Codexes are still Codexes; An army list with a Force Org chart that can act as a Primary Detachment, or an allied detachment(or in the special case of the Inquisition Codex, there's the special Inquisition allied detachment).
They're very, very different things.