Airlines have complex interline and prorate agreements to work out who gets paid what when. Essentially, yes, a second airline who reissues a ticket can claim the value of the exchanged coupons from the original issuing airline. When the ticket of the second airline gets used on a third airline, then 2 pays 3.
With your invol reroute through DFW, AA billed QR for the value of the BOS-LAX that they lifted. QR doesn't care that AA used it to send you through DFW.