I believe Roe was a compromise for the time, as they didn't see it as likely they could rule abortion completely a right of women during the 1970s without some push for a Constitutional Amendment to overturn. Roe was written to justify a compromise that neither side really supported but at least ensured abortion was legal up to a point to some degree.
This may be so from a practical perspective, but I think there was also a genuine constitutional perspective.
A person has a right to his/her own body, and this is found within the right to liberty, as philosopher John Locke had included there the right to enjoy one's own limbs and one's own health. He did not necessarily extend this to pregnant women, but he also didn't spend much time on them or the fact that by nature men could physically overpower them, as that is not different from strong men being able to physically empower weaker men, which he would have objected to.
In addition, the 1st amendment freedom of religion, 4th amendment freedom from unreasonable searches and seizures, and mention in the fifth amendment the rights to life, liberty, and property, though it an inapplicable context.
For the Roe court, one could not deprive women of the right if the 14th Amendment applied. But the problem of saying that it didn't apply is serious, and the Dobbs decision probably made its key error here. An unmarried woman old enough to consent to marriage and without a living parent obviously has a right to liberty, for she has not consented to the marital coverture rule and has no father with a coverture rule over her, so no excuse exists for denying her the right to enjoy her own limbs and health or the right to freedom from unreasonable search or seizure or the right to practice her own religion or philosophy within her person.
So what the court had to decide is at what point one could argue that a state might legally appeal. Even as a person, no embryo/fetus could have a right to the woman's body or life, but only to its own, and for that reason, viability was a reasonable compromise, because it has a 50/50 chance of life if just removed from the woman's body by induced birth instead of abortion.