While preparing a talk, I was tempted to "prove" the following relationship:
$$\text{Prin}_{G}(X)\cong [X,BG]\cong [B[\pi_{1}(X),BG]\cong [\Omega B[\pi_{1}(X)],\Omega BG]\cong [\pi_{1}(X),G]$$
Here $X$ is a 2 dimensional surface.
The second and third equivalence is right, but the fourth or fifth is wrong. The professor told me I need to think myself to understand why the based loop space does not behave in the way I thought it would, but I have no clue. For example, if $G=\mathbb{S}^{1}$, then $BG\cong \mathbb{Z}$ and the homotopy classes of maps from $X$ to $\mathbb{Z}$ is isomorphic to $\mathbb{Z}$ for any closed surface. But it would be ridiculous if $[\pi_{1}(X),\mathbb{Z}]$ is isomorphic to $\mathbb{Z}$ for any $X$. So something subtle is here and I want to ask for a hint (not a solution).
I attempt to give an answer to address my own confusion.
There are two confusions. One is the homotopy class of maps from $X\cong B(\pi_{1}(X))$ to $BG$ is not behaving nicely under based loop spaces. For any map $f\rightarrow X$, the composition with a map from $X$ to $BG$ can land it to anywhere. Therefore it does not make any sense to talk about applying loopspace operator on both sides.
The other confusion, as others pointed out is equally basic. I confused $B\mathbb{S}^{1}$ with $\mathbb{Z}$, which should be $\mathbb{CP}^{\infty}$ instead. The fact that $[X,\mathbb{CP}^{\infty}]$ is $\mathbb{Z}$ is still true because in this case $\text{Prin}_{\mathbb{S}^{1}}[X]\cong H^{2}(X)=\mathbb{Z}$ using Cech cohomology. So the fact that $\mathbb{Z}\not=\mathbb{Z}^{2g}$ give an example why the above "equivalence" cannot hold. However, I do not feel comfortable in asserting $$\text{Prin}_{\mathbb{S}^{1}}[X]\cong H^{2}(X)=\mathbb{Z}$$ as I read the proof but do not know why intuitively it must be true. So if someone can point it out I would be grateful.