The sudo permission should be added by brew at install time (see how the dotnet SDK handles installation on macs), it's poor ergonomics to have to invoke it manually.
• .NET installers install to systemwide locations and therefore typically require elevated privileges.
• Microsoft supplies both install scripts (dotnet-install) and .tar.gz/.zip archives to support unprivileged installation to arbitrary locations on all supported platforms.
• The SDK and self-contained .NET executables run from anywhere, but certain SDK functionality may require elevated privileges on some platforms (e.g., installing a trusted self-signed developer certificate).
• Framework-dependent executables use the DOTNET_ROOT environment variable to locate runtime components installed in a non-default location.