TITLE: Why is it important to have a classifying space for principal $G$-bundles over a based space $X$?
QUESTION [6 upvotes]: For a group $G$ its classifying space $BG$ can be thought of as a space with the property that $G∼ΩBG$ (the based loop space of $BG$).
This actually works more generally for spaces equipped with a multiplication that is 'highly homotopically associative'.
An important use for $BG$ is classifying principal $G$-bundles over a based space $X$: there is a bijection between the set of based homotopy classes $[X,BG]$ and the set of isomorphism classes of principal $G$-bundles.
Ok, but it is not clear to me why it is useful to have a bijection with the set of based homotopy classes $[X,BG]$.

REPLY [4 votes]: It is not just the fact that there is a bijection $[X, BG] \to \operatorname{Prin}_G(X)$, but also the form of the bijection which is useful. There is a universal principal $G$-bundle $EG \to BG$ and the bijection is given by $[f] \mapsto f^*EG$; that is, every principal $G$-bundle $P \to X$ is obtained by pulling back the universal principal $G$-bundle by some map $f : X \to BG$ (called a classifying map for $P$).
This description can be used to prove general facts about principal $G$-bundles by proving them 'universally', i.e. for the universal principal $G$-bundle. For example, you can prove the following fact by working universally: for a real line bundle $\ell$, we have $c_1(\ell\otimes_{\mathbb{R}}\mathbb{C}) = \beta(w_1(\ell))$ where $c_1$ and $w_1$ are the first Chern and Stiefel-Whitney classes respectively, and $\beta$ is the Bockstein.