Realtime shadow maps allocate texels for everything the light can see.
Lightmaps allocate texels for everything.
This makes a big difference in several cases:
faces occluded from the light don't contribute any information to a shadow map - they occupy the same texels as the object occluding them. A lightmap will allocate separate texels to shadowed faces.
faces nearly parallel to the light rays occupy only a narrow sliver of a shadow map, leading to stretchy/zig-zag artifacts when partially shadowed because there's not enough resolution to capture the shadow shape in the near-parallel axis. A lightmap will allocate a more even (or possibly adaptive) distribution of light samples across these faces.
This also demands substantially different methods for computing them. Shadow maps are designed to be re-rendered every frame, tolerating some errors like aliasing, light bleeding, and peter panning, while lightmaps are designed to be baked in advance, taking the time needed to minimize these errors as much as possible at the available resolution.
Lightmaps can also encode indirect lighting information (bounce light), which is a whole extra layer of computation.