Unfortunately it is indeed used for non-ad scripts. For example, Hearthstone on iOS fails to render the login page if GTM is blocked at DNS.
It's used to add tracking and advertising. But I've also seen it used for chat bots and chat agents. I've even seen it used for bug fixes that designers wanted to get out the door quickly.