Why aren't airliner windows aligned with their seats?
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.