Is there any reason for the nested filters to be applied on the first case and not in the second one?

Is there any reason for the nested filters to be applied on the first case and not in the second one?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)