This has nothing to do with Yii directly.
Composer allows you to install dependencies globally or for each project (by default).
https://getcomposer.org/doc/03-cli.md#global
It's just a helper for managing a project stored in a central location where CLI tools or Composer plugins that you want to have everywhere can be stored.
, - phpunit phpcs ( ), , , .