What are the main reason I need padding or trim area inside my Icon components?

I’ve studied the public design systems of a lot of high profile companies. Optically, I understand why a vertical shape might be sized differently than a square shape inside the viewbox of a icon.

But - I don’t think I understand why there are icon systems that require a 1px or 2px trim area. Why wouldn’t an icon go all the way to the edge more commonly, similar to how Gitlab’s system is?