Yes, the order of the groupings matters a lot. If you look at the left side of the filter panel, There is a vertical bar that shows just what the Any or All filter applies to. So if you have an All filter with a Any inside it, say it reads All of the following must be true:
each individual portion of the individual query pieces - and the the Any filter is just a single piece.
Example:
All Filter:
state equals CA
Any Filter under the All filter:
status equals Ordered
status equals Shipped
So to match the above, it must be in CA but it can be either Ordered or Shipped for the status.