This is true: a compact connected Lie group with trivial center is a product of simple compact connected Lie groups with trivial center.
Suppose $G$ is a compact connected Lie group. Then $G$ has a cover of the form $G':=T^k\times G_1\times ... \times G_n$ where $T^k$ is a $k$-dimensional torus and the $G_i$ are simple simply connected Lie groups. In addition, there is a discrete subgroup $\Gamma\subseteq Z(G') = T^k\times Z(G_1)\times ....\times Z(G_n)$ for which $G'/\Gamma \cong G$. Here, the notation $Z(\cdot)$ refers to the center.
Now, suppose for a moment that $\Gamma$ is a proper subgroup of $Z(G')$. Select $g\in Z(G')\setminus \Gamma$.
Proposition: The element $g\Gamma\in G'/\Gamma$ is central. That is, $g\Gamma \in Z(G'/\Gamma).$
Proof: Select any $h\Gamma\in G'/\Gamma$. Then $$(g\Gamma)(h\Gamma) = (gh)\Gamma = (hg)\Gamma = (h\Gamma)(g\Gamma).$$ $\square$
So, if we assume additionally that $G$ is centerless, we deduce that $\Gamma = Z(G_1)\times ... \times Z(G_n)$ (and that $k=0$). But then, $$G'/\Gamma = (G_1\times ...\times G_n)/(Z(G_1)\times ....\times Z(G_n) = (G_1/Z(G_1))\times ...\times (G_n/Z(G_n)).$$
This shows that $G$ is a product of simple compact connected groups, but why are they centerless?
Proposition Suppose $H$ is a connected simple Lie group. Then $H/Z(H)$ is centerless.
Before proving this, note that the assumption that $H$ is connected is crucial. E.g., if $H = Q_8 = \{\pm 1, \pm i, \pm j, \pm k\}$ is the Quaternion group, then $Z(Q_8) = \{\pm 1\}$, and $Q_8/Z(Q_8)\cong \mathbb{Z}_2\oplus \mathbb{Z}_2$, which has large center.
Proof: Let $hZ(H)\in Z(H/Z(H))$. Our goal is to show that this element must be the identity. That is, our goal is to show that $h \in Z(H)$. Choose any $gZ(H)\in H/Z(H)$. Then, by assumption, $hgZ(H) = ghZ(H)$, so $g^{-1}h^{-1}gh\in Z(H)$. Now, since $H$ is connected, there is a path $\gamma(t)$ in $H$ with $\gamma(0) = e$ (the identity) and $\gamma(1) = g$. Thus, we obtain a path $\alpha(t):=\gamma(t)^{-1} h^{-1}\gamma(t) h$ in $Z(H)$. Since $H$ is simple, $Z(H)$ is discrete, so $\alpha(t)$ is constant. Since $\alpha(0) = e$, we must therefore have $\alpha(1) = e$. That is, $g^{-1}h^{-1}gh = e$, so $gh = hg$. Thus, $h\in Z(H)$ as claimed. $\square$
Best Answer
It is well known that $$\mathrm{exp}:\mathfrak{g}\to G, $$ satisfies \begin{eqnarray}\mathrm{d}\left(\mathrm{exp}\right)_X = \mathrm{d}L_{e^X}\circ T_X,\quad (*)\end{eqnarray} where $$T_X = \frac{ e^{\mathrm{ad}(X)} -1}{\mathrm{ad}(X)} =\sum_{k\geq0}\frac{1}{(k+1)!}(\mathrm{ad}(X))^k. $$
Since $G$ is compact, all eigenvalues of $\mathrm{ad}(X)$ are purely imaginary numbers, moreover, since $G$ is non-abelian there exists an eigenvalue $i \lambda\neq 0$ of $\mathrm{ad}(X)$ for some $X\in \mathfrak{g}$ and $\lambda \in \mathbb{R}$. Let $c = 2\pi/\lambda $ then $2\pi i$ is an eigenvalue of $\mathrm{ad}(cX)$ $\Rightarrow$ $0$ is eigenvalue of $T_X$ $\Rightarrow$ using $(*)$ $\mathrm{d}(\mathrm{exp})_X$ is not an isomorphism $\Rightarrow$ $\mathrm{exp}$ is not a local diffeomorphism at the point $cX \in \mathfrak{g}$.