If it's an ordinary local object, its scope begins when it's declared, and things before its declaration can't access it. However, if it's a member variable, then anything in this class, even written before the declaration of that member, has access to it.
What happens under the hood? Why is it designed this way?
I tried to google about it but only got the rule itself instead of the mechanism or the motive.