On the definition of the transformation of the connection $1-$form. Introduction
I'm studying principal fiber bundles to deal with the gauge sector of standard model lagrangian. Now, references $[1]$ and $[2]$, gives us a definition on how the connection $1$-form should transform under the representation $g$ of a group $G$:

$\omega = g^{-1}\pi^{*}(\sigma^{*}\omega)g + g^{-1}d(g) \equiv g^{-1}Ag + g^{-1}d(g). \tag{1}$

Well, given a coordinate chart $U_{i}$, one thing that helps me to convince myself of the nature of $(1)$, is the $U(1)_{\mathrm{EM}}$ transformation of $A_{\mu}$:

$A'_{\mu} = A_{\mu} + \partial_{\mu}\alpha \tag{2}$

My Question
So, suppose that you are the first mathematician who needs to formalize the whole gauge theory. Why you would choose the transformation $(1)$ as the correct/best one? In other words: why $(1)$ is defined in that way?
$$-------------------------------------$$
$[1]$ Nakahara.M. Geometry, topology and Physics. Page $377$.
$[2]$ Nash.C. Topology and Geometry for Physicists. Page $176$.
 A: Forget principal bundles for one second. Let $(E,\nabla)\to M$ be a vector bundle with connection over a smooth manifold. If $(e_a)$ is a local frame for $E$ over some open subset $U$ of $M$, you can write $$\nabla_Xe_b = \omega^a_{~b}(X)e_a, \quad\mbox{for all }X\in \mathfrak{X}(M).$$Let $\omega = (\omega^a_{~b})$. Take a second local frame $(\widetilde{e}_a)$ over some second open subset $\widetilde{U}$ of $M$ which intersects the first one non-trivially, obtain the corresponding matrix $\widetilde{\omega}$ of local $1$-forms, and write $\widetilde{e}_b = A^a_be_a$ for some matrix $A = (A^a_b)$ of smooth functions. Now: $$\widetilde{\omega}^a_{~b}\otimes \widetilde{e}_a = \nabla\widetilde{e}_b = \nabla(A^a_be_a) = {\rm d}A^a_b\otimes e_a + A^a_b\nabla e_a = {\rm d}A^a_b\otimes e_a + A^a_b\omega^c_{~a}\otimes e_c = ({\rm d}A^a_b+A^c_b\omega^a_c)\otimes e_a,$$but also $$\widetilde{\omega}^a_{~b}\otimes \widetilde{e}_a = \widetilde{\omega}^a_{~b}\otimes A^c_ae_c = \widetilde{\omega}^c_{~b}A^a_c\otimes e_a,$$so linear independence of $(e_a)$ yields $${\rm d}A^a_b + \omega^a_{~c}A^c_b = A^a_c\widetilde{\omega}^c_{~b}.$$Without indices, this is ${\rm d}A + \omega A = A\widetilde{\omega}$. Apply $A^{-1}$ on the left of everything to get $$\widetilde{\omega} = A^{-1}{\rm d}A + A^{-1}\omega A.$$This is the non-tensorial transformation law for local connection $1$-forms. If, conversely, you can cover $M$ with open subsets carrying local frames and connection $1$-forms respecting this non-tensorial transformation law, you may recover $\nabla$. The non-tensorial term $A^{-1}{\rm d}A$ accounts for the Leibniz rule that $\nabla$ satisfies. This term also equals the pull-back $A^*\Theta$ of the Maurer-Cartan form of ${\rm GL}_k(\Bbb R)$ (where $k$ is the rank of $E$) to the open set $U$, so it's something very natural. Here, recall that for any Lie group $G$, $\Theta \in \Omega^1(G;\mathfrak{g})$ is defined by $\Theta_g(v) = g^{-1}v$, where this latter expression is an usual abuse of notation for ${\rm d}(L_{g^{-1}})_g(v)$.
The connection $\nabla$ gives rise to a principal connection on the frame bundle ${\rm Fr}(E) \to M$ (whose fibers are ${\rm Fr}(E)_x = \{\mathfrak{v} \mid \mathfrak{v} \mbox{ is a basis for }E_x\}$); it is a principal ${\rm GL}_k(\Bbb R)$-bundle, and this principal connection is an element of $\Omega^1({\rm Fr}(E); \mathfrak{gl}_k(\Bbb R))$. Local frames for $E$ are the same thing as local sections for ${\rm Fr}(E)$. Pulling this principal connection back to a $\mathfrak{gl}_k(\Bbb R)$-valued one-form on the open set $U$ using $(e_a)$, what do you get? That's right, $(\omega^a_{~b})$.
