Why can I access a Query in an "assign" widget that hasn't been executed?

In Service Studio, developers can indeed use Queries in the "assign" widget even if they have not been executed, that is, if they're apparently out of scope (because of their place in the flow). It happens so because, by design, queries are actually variables, they can be used everywhere in a Preparation or Action.

In a Preparation, if you design complex logic containing conditional statements (if or switch) with Queries in distinct branches, you'd never be able to present their result in a screen, unless you'd used an intermediate variable to assign the result of the query to the screen widget. Thus, to avoid the growth of local variables (since queries are heavily used), we've decided to keep the current behavior, even if it's a little confusing.