I had an interesting issue come about the other day in which multiple developers on a project we using different solutions for their local web development that involve the webroot of apache/nginx to differ between them. This posed a problem with Drush as it require the root parameter for certain operations (especially when combined with BLT).
The first thought was to pass it to the command line via --root or to use the pre-init hook Drush provides, but the problem here is that they are too late in the bootstrap and the root has already been determined.
Luckily, Drush is capable of using environment variables, so the solution then became quite simple, have an environment variable that each developer can use to specify their webroot (in my case even easier as they all use a form of docker). So in our alias file mysite.site.yml:
undefined
local:
uri: local.mysite.com
root: ${env.LOCAL_WEBROOT}
Now each developer can run drush @mysite.local without issue :)