It may not have been based on data at the time, but the experts were knowledgeable enough to know that it would help. And it did.
It seems to be common sense that social distancing would help to prevent the spread of airborne infectious disease.
This is further reinforced when the LACK of social distancing resulted in "super-spreader" events and the spread of COVID among retail store employees, front line workers, family members, retirement homes, etc....
These headlines make it seem like the public was duped, and social distancing was a scam.