The people (mostly) were workers and they would come for Friday prayer in the same condition, so it was said to them: If only you were to perform Ghusl.
Sunan Abi Dawud Book 1, Hadith 352