The AND operator has higher precedence than the OR operator. Therefore, it will be evaluated before the OR's will. To force your logic to do what you expect, enclose the terms in ( ) -
As to the quotes, table names and field/column names should not have quotes. Strings should have quotes. In your examples, 'name' LIKE ... should probably not be returning any thing, but it is acting like the WHERE clause is always true. In this example, 'name' is literally the string name and not the column name. The above should be -