I'm pretty sure you can buy as many colonists as you want, regardless of whether or not they're employed, up to your colony support limit.
It often makes sense to buy an extra because of how the "chunky money" works out sometimes, particularly if you have Ecoplants.
From the rules:
Players may not purchase colonists in excess of their Colony Support Limit.
There's no mention of whether they're manning a factory or not.
Also note that the Era 3 factories are special -- they must be manned to be operated, but they can support a colonist directly regardless of your Support Limit as long as the colonist is operating that factory. (Strictly speaking, they each increase your Colony Support Limit by one if and only if they're being operated)
(You can definitely buy as many robots as you want, as long as you have the Robotics upgrade, although if you have, say, seven colonists, you cannot employ more than seven robots per Robotics upgrade you own)