Well according to ST09, it was assembled on Earth and then launched into space.We also don't know how the Starship Enterprise was built.
The ship's hull is made from a metallic compound known as duranium, which allows them, from a production POV to handwave all of the disadvantages of real materials.If the ship's hull is made from transparent aluminum with opaque inner and outer skins, windows could be low-hanging fruit on the luxury scale.
It's a possibility, but again there is the fact that transparent aluminium is a far weaker substance compared to duranium, which still poses a hull integrity problem.Or maybe the ship is assembled molecule-by-molecule in such a way as to reduce weaknesses caused by window ports -- the windows themselves are bonded molecularly to the frame they sit in.
We know where the Enterprise was built in Trek 2009, but not how. The movie tells us nothing of the techniques used to assemble the various components, nor any of the materials.
In the original series, we know that duranium was used in the hull of shuttlecraft, but I believe that was the only mention. Duranium was used in portions of the interior of NCC-1701-D, but how much of it? And then there's tritanium, which was used in the bulkheads of NX-01, and in ships from the 24th century. Presumably NCC-1701 also used tritanium, but that's only speculation. Note that a bulkhead is not the same thing as the hull. Nor is it the same thing as a structural framing member.
And just how do you know transparent aluminum is weaker than duranium? Has any character on-screen ever compared their characteristics?
The point is that science fiction starships are made using futuristic techniques incorporating futuristic materials. While I'd generally agree with the statement that putting windows into a structure weakens it, that may not necessarily compromise the structure's function. We put windows in airplanes. We sent up a module to the ISS specifically to give it windows. In both of those cases, windows were considered part of the structure's function, and presumably built to minimize weaknesses. I'd expect futuristic spaceships to continue the trend ... particularly those shown in science fiction where windows also serve the production requirements of showing scale and making surfaces look interesting.