You need a map to localize, and localization to map
Drop a robot into an unfamiliar warehouse with no prior map. To know where it is, it needs a map to compare its sensor readings against. But to build that map in the first place, it needs to know where it is so it can correctly place each new sensor observation relative to the ones before it. Each problem depends on having already solved the other, which is exactly the bind SLAM, Simultaneous Localization and Mapping, exists to break.
SLAM doesn't solve localization first and then mapping, or vice versa. It solves both continuously and jointly, maintaining a running estimate of the robot's position and a running estimate of the map simultaneously, each one refining the other as new sensor data arrives. This joint estimation is what separates SLAM from naive approaches that would otherwise compound small errors from one problem straight into the other.
