You are not really setting the variable so 11 pm is true, you are changing the value of the variable to true, and you are doing it at exactly 11 pm.
Here is an explanation about variables and triggers to try to clarify what is happening. Some of this you probably already know, since you at least have your flow running from 11 pm to 8 am.
Variables: A variable is like a holding place for a value. And the variable will keep its value until you change it to something else. It might be a numeric value that can later be used in a math formula, or looked at later to see what the value is at. Or a variable might contain some text that could be looked at later for a comparison. Either way, the value stays that way until you change it.
Triggers: Most Stringify Things have triggers. If you look at a Thing to see its triggers, you will see WHEN triggers listed first, followed by ONLY IF triggers. When and only-if triggers are two different concepts.
The WHEN trigger is an instantaneous thing, and it starts the signals in a flow that go to the next Thing and tell it to do something now. WHEN I push this Button(red) Thing the Lamp Thing it is connected to will turn a light on. WHEN my camera sees motion the IFTTT Thing will tell IFTTT to run a sequence to turn on a light. And in the case of your flow to set the variable, WHEN it is 11 pm, set the value of the variable to “true”. You are not saying 11 pm is true, you are performing an action on the variable(setting its value to true) at 11 pm. And that variable will stay “true” until the other flow changes it to “false” at 8am.
ONLY IF triggers are much different. They are not a “this happened now” thing, they are a condition to be looked at.
You said your flow worked ok when you used the Date Time Thing and set it to “between 11 pm and 8 am”. Well, that was an ONLY IF condition, looking to see if it is between those two times. It is not a instant in time, it is true all night. ONLY IF triggers are used to modify the action of a WHEN trigger. So without the date time thing in there, your flow would have turned on the light every time the camera detected motion. But the only if added a condition to look at. If that condition is not true ( like during the daytime) it won’t let that do-it-now WHEN trigger happen.
So, the two small flows are just using WHEN triggers to set the variable to a value at the specific time. The value stays true all night (from 11 pm) until it is changed to false at 8 am. And you put a functions:variables thing into your flow instead of the date time Thing, and use its “ONLY IF the variable is true” trigger to control the WHEN trigger coming from the camera Thing and going to the IFTTT Thing.
Drawing the lines: Things set up to do WHEN triggers have to have their lines drawn directly to the Thing that will perform the action. And you would do that first before setting up any ONLY IF thing. Things set up to be ONLY IF triggers are used to modify the action of some WHEN trigger signal, so their connection lines have to be drawn to the yellow dot in the line you made from the WHEN trigger thing to the action thing. A connection (line with a yellow dot) is therefore a signal from some WHEN trigger thing, and can optionally have one or more ONLY IF things connected to its dot.
Hope this helps, and wasn’t too wordy.