Then it would be 産婦 and 人科, which doesn't make sense.
Think of it as 産/婦人科. Your trouble comes from wanting to join the first two characters together just because they occur next to each other. Joined together they're a different word.
The two specialties are practiced together as a general thing, so "obstretics" and "gynecology" (産科 and 婦人科) get conjoined, just as happens in English with the term "OB-GYN".