USPS charges FedEx/UPS for the delivery. If USPS is losing money on the delivery, it is USPS's fault.
I don't recall all the specifics. I have an aunt and uncle that are postal workers and they told me about it. It was some reduced-cost policy they passed to try to convince UPS/FedEx customers to ship USPS but they didn't put in exclusions to prevent UPS/FedEx from taking advantage of it.
I don't believe they aren't losing money in the sense they are subsidizing UPS/FedEx, only in the sense that they are making less money than they were when UPS/FedEx had to pay the regular price for the deliveries.