Let me begin with some motivation. In calculating the Chern-Simons invariant of a $U(1)$ connection $A$ on a 3-manifold $M$, we can proceed by picking a bounding 4-manifold $X$ with $\partial X = M$ and an extension of $A$ to $X$ and write $$ CS(A)=\frac{k}{4 \pi^2}\int_X dA \wedge dA, $$ where the level $k$ must be an integer for this expression to be well-defined up to $2 \pi i$ when we choose a different bounding 4-manifold. However, if we have a spin structure everywhere, then on a closed 4-manifold, this expression is always an even multiple of $2\pi i$ since the intersection form is even. Thus, we can let $k$ be a half-integer and still get a well-defined invariant one we exponentiate.
Let me phrase this another way. If you have a spin 4-manifold $X$ and a map $X \to K(G,2)$, the pullback of a class in $H^4(K(G,2),\mathbb{R}/\mathbb{Z})$ is actually defined up to even integers.
I want to know why this happens for $H^4(K(G,2),\mathbb{R}/\mathbb{Z})$ and in which other cases it happens. I imagine the answer has to do with relations involving $w_2$ in the $p=2$ Steenrod algebra such as Wu's relation.