Further Clarification From the moment of its activation/creation, an AI is a legally independent entity. "New" or "Fresh" AIs are treated much like children until they reach a certain point, legally, but they are far more advanced than human adults in many fashions. Beyond the initial "Starter" component, the AI itself chooses what and how its body is constructed. It is at this point that an AI, which is fairly mobile at this stage (Perhaps the size of a large car? I'm not sure), decides its future and enters contracts with appropriate entities. Much like a long-term job posting, a corporation might post an "AI needed for new power plant" want ad. An AI can sign up, make an agreement - Which includes what sort of services the AI would provide, like power output - And then begin dictating how its "Body" is constructed. The body is inexorably linked to the AI due to the hardware built in to it and, realistically, it's cheaper to re-build than try and coax an AI into adopting another one's body, especially since AI death is generally due to catastrophic damage that also destroys much of the body.
A ship-mounted AI might be a transport ship (Although I'd say that's unlikely since ships can and are able to function and fly without an AI), designed to carry and move humans and their cargo. Or it might be a survey ship, designed to go into places where humans cannot, with little to no human accessible parts. Or maybe it's a courier ship, with a reactor and drive system that would irradiate anything living in a close radius.