First there were windowless caves and then dark shelters where the only light came through the entry. The first window must have been an attempt to see outside while still enjoying all the protection and comfort of the inside. The way the light fell through that window must have been an added bonus. The patch it made on the floor became a warm spot to curl up in. Windows have come a long way but they still let us see the outside from the comfort of the inside and they still provide light that.