Perhaps moths have taken their navigational clues from the moon, which for millions of years has appeared bright & fixed as it is far away - keep it on the left and you go relatively straight. A bathroom light is brighter and is unfortuantely nearer, so if you try to keep it on your left hand side you end up travelling in circles. This confuses moths who say, "Well it worked for my great-great...". What a cruel heartless person you are - switch your lights off! This might help them with the window bit, as it will probably be lighter outside and I reckon moths don't care for open-window clues like air currents.