At lower temperatures, quarks are always bound with other quarks because of color confinement. Only color-neutral particles can exist by themselves. A free particle with a color charge has too much energy due to its interactions with other color charges, even if they are far away. In fact, the energy it takes to separate quarks is so large that new quarks will be created out of the vacuum and bind with the quarks you're trying to separate. As a result, the free quarks in the quark-gluon plasma will bind with other quarks to form color-neutral particles once the temperature drops to the point where color confinement holds.
On a more general note, even if we were talking about electrically charged particles, we would see the same basic effect you describe. If the particles have a greater thermal energy than their binding energy, they won't stick together, because they have enough energy to break their own bonds. Once they cool down enough though, they will no longer be able to break their bonds. As random motion brings oppositely charged particles together, they will form bound states. The difference is that it is still possible to have a free electric charge. As long as it's not near an opposite charge, it can exist as a free particle. A free quark, however, cannot exist at low temperature.