Thinking that it was too obvious, I spent ten confused minutes wondering what could've been the idea behind it. When I inquired with the creator, the succinct "I thought this was more readable code" landed me back in reality.
begin for r_x in (select * from x) loop for r_y in (select * from y where x_id = r_x.id) loop for r_z in (select * from z where y_id = r_y.id) loop -- some code ... end loop; end loop; end loop; end;
In case you're wondering, I prefer:
select * from x join y on x.id = y.x_id join z on y.id = z.y_id;