A PooledMutableBlockPos is a BlockPos that is Mutable (can be changed/moved) and Pooled. Retain gets a PooledMutableBlockPos from the pool for you and close (called automatically by the try-with-resources block in the same way as in a try-finally block) releases the PooledMutableBlockPos you got from retain back into the pool.
So instead of creating 16x16x255 (65,280) new BlockPos objects you only create maximum 1 new object (the PooledMutableBlockPos is likely to have already been created and added to the pool).
Doing this avoids the cost of initialising all those objects (this cost is pretty small, but still deserves mentioning), avoids using up 786,432 bytes of ram (each block pos contains 3 integers and each integer is 4 bytes of ram) for each chunk and it avoids the cost of destroying (garbage collecting) all those objects.
This may not seem large, but remember that all this is being run for each chunk, and that any reduction in load time counts in big modpacks.