Why is it required to use sandbox solution in SharePoint?

The sandbox solution enables the creation of simple, deployable, and reusable packages that include features, site definitions, and many other capabilities. The sandbox solution may be manually activated and removed by going to the settings and adjusting the parameters. The application may be installed on a server. Sandboxing allows you to set restrictions in place where the environment’s execution allows you to enable and keep specific resources in the sandbox without impacting the rest of the server. Because sandbox solutions aren’t utilized to deploy at the administrative level, they can’t influence the entire server. The site collection may be used to deploy it on a site with administrator rights. Only the administrator has access to the sandboxed solutions’ parameters, such as load balancing, tiers, quotas, resource points, and so on.