legal personhood (such as corporate personhood) are tools/frameworks which facilitate certain economic actions, such as the creation of charters for specific initiatives.
Like any useful force amplifier, legal personhood has effectively been co-opted to benefit those entities which stand to gain from it (e.g., corporations, large-money political donors, etc).
Thus, it probably won't surprise anyone when AIs are granted legal personhood, to bypass the detrimenal effects they will inevitably have on natural persons.
That said, it is likely a good thing to keep meatspace in some kind of privileged legal category, lest the rights of legal persons outweight those of natural persons (which seems to be the inevitable conclusion, and goal, of all this).