Miles aren’t cashback. Cashback is just that, cash back. It means you get 2% (for example) back. You pay 100$ using your card, then 2$ will be taken off your credit card bill and you’ll end up paying only 98$.
If you can manufacture spend for less than 2% in fees/losses (in this example), you’ll turn a profit.