To be fair, a ship can construct a capital ship- the thing is, that 'ship' is usually a skeleton dry dock attached to a station, which has a bunch of engines, thrusters, and reactors attached to it. Now, a full-fledged warship would be extremely unlikely to be able to construct any sort of ship, since a warship is a ship for war. Meanwhile, one would probably make ships specialized in making smaller things, because it allows for higher efficiency and all that. And the reason why you usually don't have a ship that constructs capital ships is because resources are more available in orbit above a planet, which means you really don't need anything other than maneuvering thrusters, and is moved when needed through the use of tug 'boats,' or the space equivalent of.
I have no idea why I said that, the thought just caught my fancy and i decided to say it.