Affirm stock tanked 21% after posting larger-than-expected quarterly loss and disappointing financial outlook.