Why aren't airliner windows aligned with their seats? On a recent airline flight, I noticed that the spacing of the plane's windows was different from that of the passenger seats: some of the rows had a window directly in line with them but for others, the windows were partially obscured by the seatbacks in front or behind.

Is there a reason that the windows aren't manufactured with a regular spacing to align with the seat rows? Does it have to do with the fact that different airlines may be using different seating configurations for the same model of aircraft?
Because the pitch of the frames is not related to the pitch of the seats. The windows placement have to cut through as few frames as possible.


You can see it in the following picture, noting that frames are "highlighted" by the vertical riveting



Image source

It is even more evident in the picture contained in this answer on UX.SE:




Because the aircraft is designed once, but "decorated" by several airlines in several different manners. For example, an A320 or a B757 will have the windows always in the same locations, but depending on the airline that is using it, it will most probably have the seats in slightly different locations.