Soils is part of the issue, but only part. True, if the subgrade and base perparations were not done correctly, the concrete may "heave" and crack. That would be due to a number of possibilities, but most prominantly poor compaction and/or poor drainage. Poor compaction will allow for movement of the earth under the slab, allowing for unwanted movement of the slab, thus cracking. Poor drainage will also allow for movement of the earth under the slab, thus cracking.
Remember that all concrete slabs are subject to cracking, though. Each and every one. Proper design of the slab will reduce cracking to negligible, or confine it to specific targeted places, like tooled or sawn joints. These joints are commonly referred to as control joints, as they provide a weak vertical plane in the slab, and will by the place cracks might occur, thus not marring the larger plain faces of the slab. Reinforcing is yet another issue. Was you slab reinforced with reinforcing steel? This steel is called rebar (short for reinforcing bars), it comes in various sizes, and when properly designed into the slab, will be yet another guard against crakcing, as it holds the slab together as one unit. But even well designed slabs like these will still have control joints to capture the errant crack that may still occur.
If your slab was not built upon a well compacted free-draining gravel base course, was not reinforced with even minimal reinforcing steel, and had no jointing pattern to direct the cracks to less visible places, then your slab was destined for large cracks right from the start.