(EDIT: This answer is completely wrong, SU(2) is diffeomorphic to S3 and SU(3) is obviously not three-dimensional. I came up with this ridiculous explanation based on an incorrectly done analogy to Kaluza-Klein theory, and right now I feel like I wrote it half-braindead. The question remains open, and I'm only leaving this answer on for the sake of the comments.)
It's true that the type of compactification has to do with the observed interactions. The U(1), SU(2), and SU(3) groups appear in the Calabi-Yau or G2 manifolds that the theory is compactified on. The curvature of the manifold with U(1) symmetry is linked to electromagnetism in QED, and analogous arguments apply for the weak and strong interactions. And then there are the uncompactified 4 dimensions that are found in general relativity.
The explanation for this relation is best seen in the supergravity approximation. In Kaluza-Klein theory you have gravity (standard general relativity) in 5-dimensional spacetime, which is compactified around a manifold with U(1) symmetry to obtain 4-dimensional gravity and another force with U(1) gauge symmetry, which we know as electromagnetism.
This is taken further in supergravity, where you have compactification around SU(2) and SU(3) manifolds (requiring 2 and 3 extra dimensions respectively), each giving rise to new forces with SU(2) and SU(3) gauge symmetry respectively.
As supergravity is found in the classical limit of superstring theory, the critical dimension is carried over to string theory.