All pipeline components (if more than one) are executed in a subshell, and their variable assignments are not stored in the main shell.
The reason for this is that bash does not support real multithreading (with simultaneous access to variables), only subprocesses that work in parallel.
How to avoid this :
, bash ( ). bash , :
f > >( cat )
, , . (, -?)