Safety and security.
Humans naturally desire to live in safer and more secure environments. The prehistoric ruins of Jericho show that humans have built fortifications around their living spaces (cities) over 10000 years ago. It is not unthinkable that much older settlements with defences exist, but have been lost by the ravages of time due to them being made of less sturdy materials (such as wood or loose rocks).
A spaceship or other self-contained environment is intrinsically unstable. While safeguards can always be built in, malfunction of that environment would result in catastrophic death to everyone inside that environment. For example, a floating cloud-city on Venus, if it leaked and crashed, it would spell certain doom for everyone inside it.
Such self-contained cities are also highly susceptible to sabotage, and considering the extreme warlike nature of humans, it is likely that enemies would make such self-contained cities a prime target, as they can provide the maximum damage to enemy lives and materialmateriel with the smallest cost.
It makes much more sense to consider terraforming as an ultimate extension of humanity's need for security. A terraformed planet has a stable biosphere, and cannot have its biosphere easily destroyed (short of targeted asteroid strikes), and even in such cases, terraforming technology may be able to reverse much of the damage from the resulting nuclear winter.
Furthermore, a terraformed planet also greatly reduces the need for further maintenance once the terraforming is complete. While a Venusian cloud city requires constant input of lifting gases and possibly replacements to its corroded external compartments, a terraformed Venus would not require as much maintenance, and would also be far more stable.
Therefore, humans would generally not start with terraforming planets due to their large capital outlay, but as more and more people begin to settle on the planet, humanity's natural need for security would drive them to terraform it.