Why are these windows on some airplanes red?
A red/orange color is typically used to denote flight test instrumentation. Indeed, these windows do contain such instrumentation. Below you can see a similar window on a 747-8I flight test aircraft (note the 7th window from the nose):



And the corresponding inside view: