Islam is very objective and clear on the socialization of man and woman out of the circle of mahram and closes all venues that may threaten the sacred institute of marriage. Islam believes that healthy marriage forms a healthy society and hence it needs to be protected at all cost. Prophet Muhammad(SAW) clearly stated that when a man and woman are alone, the third person with them is shaitan (satan). It shows that humans have the tendency to sin if provided with a favorable circumstance hence avoiding that is always better for them.
Regarding the Friday(Jummah) prayer congregation, the same principal of modesty applies to both man and woman and hence they are instructed to be in separate areas for them to avoid circumstances of sin and rather concentrate more on the actual objective of their gathering which is to offer prayer to their creator.
The following verses of Quran addresses the above issue:
Tell the believing men to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts, etc.). That is purer for them. Verily, Allah is All-Aware of what they do.
And tell the believing women to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts, etc.) and not to show off their adornment except only that which is apparent (like palms of hands or one eye or both eyes for necessity to see the way, or outer dress like veil, gloves, head-cover, apron, etc.), and to draw their veils all over Juyubihinna (i.e. their bodies, faces, necks and bosoms, etc.) and not to reveal their adornment except to their husbands, their fathers, their husband's fathers, their sons, their husband's sons, their brothers or their brother's sons, or their sister's sons, or their (Muslim) women (i.e. their sisters in Islam), or the (female) slaves whom their right hands possess, or old male servants who lack vigour, or small children who have no sense of the shame of sex. And let them not stamp their feet so as to reveal what they hide of their adornment. And all of you beg Allah to forgive you all, O believers, that you may be successful. [Quran 24:30-31]