The decision was legally sound. Most every supreme court decision is, even those that have been overruled. People forget that for a case to reach the supremes there has to be sound legal argument on multiple sides. Their decisions are therefore rather arbitrary but that is OK. The legislature can bypass any scotus decision through new laws or even a constitutional amendment. Our present difficulty is that the legislative branch has all but abandoned that role.
Right now, is a robot get incorporated, it can be recognized legally as a person and Ai can theoretically control it . and that is because of poor decision by the justices.