When we talk about "cracking" what we are usually talking about is uncontrolled cracking...
Concrete being a rock like substance, and is subject to the same stresses. It expands and contracts and and builds up stress. In reality the term "cracking" is a misnomer-concrete must crack somewhere, and if not given a place to crack, will find itself a location itself. So what we really want to address is how to control the cracking. But let's cover some important items before we look at crack control.
The dirt underneath and how it is prepared, is an important factor. The organic material (grass and debris) must be removed, as it will degrade over time and leave a void below the slab. When weight is put above, it will stress the slab and create a crack. Concrete has great compressive strength, but is weak in a "snapping" fashion, tensile strength. Also, if fill is added, it should be compacted, to avoid shrinkage and voids underneath.
Another important issue is the amount of water that is added to the concrete. When excessive amounts of water are added to concrete, the concrete becomes weak. When you see concrete being poured and it looks like water, this is a problem. It is usually the result of ignorance or just downright laziness. On commercial jobs this has actually become such a bone of contention, that the "slump" or wetness of the concrete will often be specified in the contract. Normally no water is added without approval by a test man.