Some applications and tools expect that the first selector is the "main" selector. This is not a bug (violation of the JCR spec or contrary to the documentation) but a compatibility issue with Jackrabbit 2.x. So for the XPath query
the expectation is that the path of the first selector is "/a/b" and not "/a". The XPath query is converted to SQL-2 join, that has two selectors.