The lambda expression in EF queries are expression trees, not code. when the query is executed, the expression tree is converted to sql. only limited amount of c# syntax and function calls can be converted to sql.
the .Contains() confusingly has two translations
<string1>.Contains(<string2>) => string1 like string2
ex:
col1.Contains("x%") => col1 line 'x%'
<enumeriable>.Contains(<string>) => string in (<enumeriable values as comma separated list>)
ex:
var list = new int[] {1,2,3,4}
...
list.Contains(col1) => col1 in (1,2,3,4)
the following can not be translated to sql
allQueries.Any(q => inst.NormalizedTitle.Contains(q))
because allQueries is a c# List<>, and can not be translated to sql except as an "in clause"
when you ToList() an EF query, the sql is generated and executes. the request is c# objects, so any linq to object queries will work.