Maybe it also makes sense to provide an "abstract" answer to this. Place yourself in the category of spaces over $M$. For present purposes it does not need to be a manifold, and in fact the category we work in may be more general too. I will suppress $M$, i. e. when I say "an object $X$" I will actually mean a map $X\to M$, and when I say "a morphism $Y\to Z$" I will actually mean a fibrewise map from $Y\to M$ to $Z\to M$, etc.
Now for an object $X$, there is another one $\operatorname{Aut}(X)$, with the property that morphisms from any $Y$ to $\operatorname{Aut}(X)$ are in one-to-one correspondence with fibrewise automorphisms of $Y\times_MX\to Y$ over $Y$. This has canonical group structures on its fibres; it might be a group bundle (but not necessarily) and this group bundle might even be trivial, i. e. be isomorphic (over $M$) to the projection $M\times G\to M$ for some "usual" group $G$, and then one gets "your" situation.
More generally, for another object $X'$, there is still another one $\operatorname{Iso}(X,X')$ such that fibrewise maps from any $Y$ to $\operatorname{Iso}(X,X')$ are in one-to-one correspondence with fibrewise isomorphisms between $Y\times_MX\to Y$ and $Y\times_MX'\to Y$ over $Y$.
Now $\operatorname{Iso}(X,X')$ comes with a canonical right $\operatorname{Aut}(X)$-action and a canonical left $\operatorname{Aut}(X')$-action which commute, and would be a principal left $\operatorname{Aut}(X')$- and a principal right $\operatorname{Aut}(X)$-bundle in appropriate sense, except that it may happen not to have global support - i. e. the map $\operatorname{Iso}(X,X')\to M$ may happen not to be surjective (in fact it might well happen that $\operatorname{Iso}(X,X')$ is empty).
However if that map is surjective, then you may try to reconstruct $X'$ from $X$ together with $\operatorname{Iso}(X,X')$. More precisely it is natural to hope that in this case $X'$ is isomorphic to the (fibrewise) quotient of $\operatorname{Iso}(X,X')\times X$ by $\operatorname{Aut}(X)$; informally speaking, you take pairs $\left\langle\varphi,x\right\rangle$ where $x\in X$ and $\varphi:X\to X'$, and identify $\left\langle\varphi,\alpha(x)\right\rangle$ with $\left\langle\varphi\circ\alpha,x\right\rangle$ for $\alpha\in\operatorname{Aut}(X)$. This is the associated bundle construction.
All this works for sure when $X$ is a trivial bundle, i. e. is the projection $M\times F\to M$ for some $F$; then $\operatorname{Aut}(X)$ will be a trivial group bundle. Given some structure on $F$ (such that a vector space) you might want to switch to the (fibrewise) subgroup of $\operatorname{Aut}(X)$ consisting of structure preserving automorphisms, and to the (fibrewise) subbundle of $\operatorname{Iso}(X,X')$ consisting of structure preserving isomorphisms. You then get as one of the examples what you are after: a vector bundle is more or less the same thing as a fibrewise vector space $E\to M$ such that for a trivial one $M\times V\to M$ the object $\operatorname{Iso}(M\times V,E)$ has global support.
I cannot think of an appropriate reference right away that there surely are many, all this is well known at least from 1970ies on...