According to
BIP125, the fee paid for the replacement transaction must be greater than the total fee paid for all the transactions that are evicted from the mempool after the replacement.
You are correct but bip 125 is not a consensus rule, i.e not following its rules doesn't make a block invalid, your node could be set up in a way that it doesn't even signal RBF and still allow transaction replaceability.
Here is a theory of why other pools would mine the second set of transactions even if the sum fee is lower on that second transaction, and just to keep things simple, we would just assume it's a 270 transaction with 100 inputs and a single output
Total vSzie = 14810 Vbyte paying 100 sat per Vbyte would mean 3,998,700 sats , you could fit 270 of those in a 4 block i.e you make 399,870,000 sats
You are a pool with 10% the hashrate, i,e you find 1 block every 10 blocks, and you see that the second transaction spends 1 input of each transaction, a transaction size of 14810 paying 1350 sat / Vbyte or 19,993,500 , while the original transactions pay 100 sat, and you still have some transactions paying 200 sat/Vbyte that are enough only for 2 more blocks , why wouldn't you as a pool rush to include that transaction that is paying almost 7 times the other transactions?
bip 125 concept maximizes profitability on a global scale, i,e if enforced by everyone and all transactions are non-miners, if those 270 transactions were user transactions and no miners were playing games, and they were all on the same line, it would make sense, why replace a 4
BTC reward for a mere 0.2
BTC reward? reject the second transaction keep 4
BTC worth of reward floating until it's time comes, but we don't know if no miners are "playing those games".
Antpool and Foundry alone own 52% of the total hashrate, so they are most guaranteed to find every other block, in my above example if their "spam transactions" cost them 4
BTC they are almost guaranteed to retrieve 2
BTC in the worst case scenario even without having to play those games (mempool runs out of higher paying transactions and those spam transactions start to be picked by others), obviously, those vague number of mine would not work -- but if they carefully evaluate the numbers they could manage to artificially raise the fee rate by injecting
BTC into the system in order to extract more of it.
This remains but a theory that some people believe in, it could be valid, we don't know if there are enough real users paying anything above 10 sats, and half of those transactions could be there for spam, where x, y, z pools spend 0.2
BTC on each block to raise the total fees to 1
BTC, and if they find at least 1/4 of those blocks -- they make more money.