TITLE: Why do people care about principal bundles?
QUESTION [33 upvotes]: I've started to learn a little about principal bundles (in the smooth category) and while I see how notions like connections and curvature are abstracted from the setting of vector bundles and brought into the principal bundles world, I feel highly unmotivated regarding  to why this is done in the first place. 
So,

How do principal bundles appear "naturally"? 
Why did people started thinking about connections, curvature, parallel transport on principal bundles? Why would one want to put connections on them? Study their curvature? Even determine whether they are flat or not?
Do we gain something by considering the frame bundle associated to a vector bundle and studying its connection and curvature and not working directly with the vector bundle itself?
What kind of problems the machinery of principal bundles helps to solve? What notions does it clarifies?

Feel free to provide examples of results or ideas from any field, including physics. Explicit geometric examples are especially welcomed.

REPLY [7 votes]: In string theory, principal bundles can arise quite naturally when considering the compactification of extra dimensions. 
T-Duality in string theory is a duality which relates string theory on one spacetime to string theory on another spacetime. The simplest example of T-duality says that bosonic string theory on $\mathbb{R}^{25} \times S_{R}^1$ is equivalent (in terms of the physical observables of the theory) to bosonic string theory on $\mathbb{R}^{25} \times S_{1/R}^1$. 
(The subscript on the $S^1$ refers to the radius of the compactified dimension.)
A natural generalisation of T-duality considers a spacetime with a free circle action whose orbit space is the uncompactified spacetime manifold $M$. Locally, spacetime is a product $M \times S^1$, but not globally.
One is led to consider a principal $S^1$ bundle $\pi : E \to M$, where $M$ is the uncompactified part of your spacetime, and $E$ is your total spacetime. T-duality then refers to the construction of another principal bundle $\hat{\pi}: \hat{E} \to M$ on which you have an equivalent string theory.