Not any such principal bundle has that property, for example the trivial bundle would be isomorphic to the group product $\mathbb Z_2\times U(1).$ A principal bundle is not completely defined by specifying the underlying manifold and the fibre: you need an action of the group on the bundle.
The situation that you describe can be arrived at by the projection
$$U_1\to U_1:\exp(i\theta)\mapsto\exp(2i\theta)$$
and the action
$$\mathbb Z_2\times U_1\to U_1:(z,\exp(i\theta))\mapsto \exp(i(\theta+z\pi))$$
where an element of $\mathbb Z_2$ is interpreted as a residue class of 0 or 1 modulo 2, i.e., $z$ is either an even or an odd integer; the result of the exponential only depends on the parity of $z.$
In your alternative formulation, $\mathbb Z_2$ can be modeled by the subgroup $\{\exp(i0\pi),\exp(i1\pi)\}=\{1,-1\}$ of $U(1).$