• Because the query is dynamic, and without sp_executesql it will not expand the contents of the variable.

    Dynamic queries like this are bad practice, I would highly recommend not doing this.