Render element and caching
Render arrays are trees. If you hide() the subtree P1.P2.P3.P4, it's stil possible for a supertree (P1.P2 or P1.P2.P3) to have caching enabled (i.e. have #cache set).

Also note that just having #cache set does not mean that the subtree with that element as a root does not get cached per se. Only when #cache[keys] is set is render caching triggered. #cache can also just contain cacheability metadata (tags, contexts, max-age) describing the cacheability of that subtree.

See https://www.drupal.org/developing/api/8/render/arrays/cacheability.