Because CTEs are not named subqueries, really. For example, CTE is only evaluated once, even if it&#x27;s referenced in multiple places, and those places may have conflicting ideas of what&#x27;s the best way to evaluate it.<p>Consider for example this:<p>WITH x AS (SELECT a, b FROM t)
SELECT * FROM x x1 JOIN x x2 ON (x1.a  = x2.b);<p>Now, had this been evaluated using a merge join, the &quot;x&quot; CTE would have to be sorted first by &quot;a&quot; or &quot;b&quot; (for either side of the join). Well, that can&#x27;t really happen.<p>Another issue is locking - consider this version, for example:<p>WITH x AS (SELECT a, b FROM t FOR UPDATE)
SELECT * FROM x x1 JOIN x x2 ON (x1.a  = x2.b);<p>In other words, it&#x27;s way more complicated than it might seem, especially if you can&#x27;t break existing uses (e.g. the locking).