Early Roombas had no sensors so they implemented randomization in movement and bounces to allow it to cover the room. With newer models they received sensors and started to clean in straight lines - depending on the manufacturer it may be first around the edges and then straight. Similar to how a human would mow a lawn.