It's not using just the compiler. This agent is configured to use the full version of Visual Studio for some reason, and building through that, which requires a license. You can build via the msbuild system, which doesn't require a license.
It gets worse if you use Microsoft D365 AX products. Then you have to provision an entire Build server for builds which has to run Visual Studio 2019 on Windows 10. To do a build you run a pipeline in Azure DevOps, which runs the compiler in a full Visual Studio 2019 environment, which has to run on a special Azure virtual environment running Windows 10 hosted by Microsoft. It's so fragile.
It gets worse if you use Microsoft D365 AX products. Then you have to provision an entire Build server for builds which has to run Visual Studio 2019 on Windows 10. To do a build you run a pipeline in Azure DevOps, which runs the compiler in a full Visual Studio 2019 environment, which has to run on a special Azure virtual environment running Windows 10 hosted by Microsoft. It's so fragile.