size_t is only guaranteed to be large enough to store the size of the largest object. This is not the same as being able to index all of memory.
You could imagine a platform with restricted continuous allocation size where the maximum object size is smaller than the size of the address space.