Agent bootstrap :- What does share-mnt do?

I am trying to better understand the rancher agent bootstrap process, and looking at the scripts and the logs noticed that there is a call to nsenter after the agent container is up and running.

It seems that this call is used to run a process called share-mnt to mount /var/lib/rancher/volumes and /var/lib/kublet.

I guess that this may be due to the fact that the directories are created in the container and shared with the host, and that is why this special step is required ?

In any case, what is the reason for this directory being shared between the host and the agent ?

Thanks