Extract and combine multiple values from a jsonb column
jsonb_path_query() is a set-returning function. When putting more than one of those in a SELECT list, this is the expected behavior. See:


What is the expected behavior for multiple set-returning functions in SELECT clause?


You seem to be looking for a CROSS JOIN instead:

SELECT *
FROM       (SELECT jsonb_path_query(test, '$.title'::jsonpath) AS title FROM jsonb_test) a
CROSS JOIN (SELECT jsonb_path_query(test, '$.tags.tag'::jsonpath) AS tag FROM jsonb_test) b


Alternatively, and probably more elegantly, use two LATERAL joins:

SELECT a.title, b.tag
FROM   jsonb_test j
     , jsonb_path_query(j.test, '$.title'::jsonpath) a(title)
     , jsonb_path_query(j.test, '$.tags.tag'::jsonpath) b(tag);


db&lt;>fiddle here


What is the difference between LATERAL and a subquery in PostgreSQL?


Effectively, a "proxy cross join". See:


Understanding multiple table join with aggregation