It is prohibited outright. Wash trades fabricate the one signal most participants trust — volume — and are used to fake liquidity, manufacture tax losses, or inflate a venue's reported activity.
Accidental self-matching within one firm is a different matter, but it still triggers surveillance, which is why self-trade-prevention is standard. In crypto, exchange volume figures have repeatedly been shown to include large amounts of wash volume, so treat unaudited volume as marketing.
Example: two accounts under one owner trade 50,000 shares back and forth at 10.00 twenty times. The tape shows a million shares of activity and no ownership changed at all. The only real cash flow is the fees paid — and the enforcement action that follows.
Related: self-trade-prevention, market-manipulation, tape-print, pump-and-dump