Concrete shrinks as it cures so there can be cracks from that, but big cracks from entire slab shifting in some spots = bad site prep.
Really to do things right you need a footing at least 8 feet deep if more. It's hard to do just a slab and have it not crack. That's why you see sidewalks and pavement cracks all the time, those are just slabs put on the surface. They do their best but it's always going to move a bit from the frost.
When they built my house they added a concrete deck on the back, that slab was part of the actual garage slab and poured in one continuous poor. The outside portion sat on two big square pillars that go like 10+ feet in the ground, there's probably a footing in there too, would not be surprised. The two pillars met up at a beam which the slab sat on. There was actual plates of steel + rebar in that thing.
They seriously engineered that to last. Unfortunately it had to all come out when they did the weeping tiles. Took a day with heavy machinery to get that deck out. The pillars are still in the ground. I told the guy if they don't move after he digs around it to get to the weepers to just leave it in, and it did not move. It was deeper than the weepers were. The other pillar was not in that area so it stayed in too. I can build my new deck over them when I get to that, and know it will be solid as hell.
You don't see that kind of construction anymore.