Being a legal person is not a logical prerequisite for being named as an inventor on that argument alone, because there's not a legal liability that stems from being named as an inventor.
(That's not to say AI should or should not be capable of being named as an inventor).