In some cases LINQ can do things that you don’t expect – here is an article that explains the situation.
The main emphasis from Scott Hanselman is:
When you are working with something that is IQueryable; that is, the source is IQueryable, you need to make sure you are actually usually the operators for an IQueruable, otherwise you might fall back onto an undesirable result, as in this database case with IEnumerable. You don’t want to return more data from the database to a caller than is absolutely necessary.