We study the structure of classifying spaces of Kač-Moody groups from a homotopy theoretic point of view. They behave in many respects as in the compact Lie group case. The mod p cohomology algebra is noetherian and Lannes' T functor computes the mod p cohomology of classifying spaces of centralizers of elementary abelian p-subgroups. Also, spaces of maps from classifying spaces of finite p-groups to classifying spaces of Kač-Moody groups are described in terms of classifying spaces of centralizers while the classifying space of a Kač-Moody group itself can be described as a homotopy colimit of classifying spaces of centralizers of elementary abelian p-subgroups, up to p-completion. We show that these properties are common to a larger class of groups, also including parabolic subgroups of Kač-Moody groups, and centralizers of finite p-subgroups.