Because the content remains part of the React tree, it can access context from providers above the component that created the portal.