MetaMask Swaps fetches multiple quotes from various DeFi protocols. When you execute a swap through MetaMask, you interact directly with the liquidity source that offered the best price for your requested trade. MetaMask does its best to optimize each transaction before the swap is submitted.
However, MetaMask cannot guarantee that every transaction will be successful because the market and network conditions can vary dramatically, especially when highly volatile assets are traded. In your case, the swap failed due to slippage and was reverted because the tokens that you were about to receive were lower than the 2% slippage that was set on the trade.
The transaction failed in order to protect you and your funds. When a swap reverts, some of the gas fees are routed to the Ethereum miners, who process the transactions on the network. It is worth noting that MetaMask did not get any fees from your failed transaction.
Next time you decide to trade a highly volatile asset, make sure to increase your slippage preferences and gas for the transactions as it will increase the likelihood that your swap will successfully go through.