1) most producers are DJs as well, and often (or at least historically) singles were used as much to promote the DJ as they were a revenue stream.
2) the few producers that weren't DJs were also engineers for other DJs who weren't very good in the studio. Thus they made their money engineering
3) most clubbers wouldn't be interested in a 7 minute unmixed single of their favourite club track. So the single sales generally go to other DJs (and there's thousands of DJs who never make it out of their bedroom - so the DJ scene is considerably bigger than it sounds).
The modern EDM scene is likely a little different these days since many EDM DJs are now also pop artists. But I think they still essentially follow this model.