A dealing desk broker creates the market its clients trade on. It can net one client's long against another's short and only hedge the residual externally. This is legal and disclosed in most jurisdictions, and it is how many of the largest retail brokers operate.
The conflict is structural: an unhedged client loss is broker revenue. Regulation addresses it through execution rules, reporting and capital requirements rather than by banning the model. See b-book and best-execution.
Example: clients hold 4,200 lots long EUR/USD and 3,900 short. The desk nets to 300 lots of exposure, hedges that externally, and keeps the spread on all 8,100 lots.
Related: b-book, no-dealing-desk, market-maker, best-execution