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.
Reference: Sunan Abi Dawud 352 In-book : Book 1, Hadith 352 English translation : Book 1, Hadith 352
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.