For example, someone set ask BTC/USDT limit offer to sell 1 BTC for 19000 USDT. In same time i setup limit order to buy 1 BTC, for example, by 19100 USDT..
In this case I got 1 BTC and i'll pay for 19100 USDT. The seller whose order I paid will receive 19000 USDT.
Where is 19100 -19000 = 100 USDT ? This is exchange profit or I wrong and exchange will not allow you to place such order?
Exchange matching engine operates on the first come first serve basis. So If someone come and place sell order of 1 BTC for 19000 USDT and there is no one that offers to buy at this price or higher than this order, unfilled, land in orderbook waiting to be filled. And now when you place buy order of 1 BTC at a price 19100 USDT your order goes to matching engine that check in orderbook if any seller is offering this price or lower. In our case there is a 19 000$ sell order which is being filled. So in situation you just described you just bought BTC for 19 000 even though your buy offer had price of 19 100. This 100$ stays at your wallet only because 19 000$ sell order was send to exchange before your order.