That sounds a lot like what I understood how etrade platforms like Robinhood work when I was reading up on the GME shorts fiasco.
I definitely only have a surface level understanding of it, but it sounded like the stock brokers have a buffer in-between the transaction request to buy/sell, and they first try to handle that locally within their portfolio, before expanding to external trades. And if there's a favorable internal trade, brokers like Robinhood siphon out a little something something for themselves.
Sounds like people are getting busted for doing essentially the same thing Wallstreet has been doing for decades. Again.