The local retrans fees go to the stations. The stations have a fee they pay to the networks based on the size of their market. If they want to be able to afford to pay the fee, they have to sell enough advertising and get enough subscriber revenue to make the payments. The ad revenue is based on ratings, but it is quite lucrative in general compared to national ad campaigns. It is the stations missing out on the subscriber revenue, and, if they cannot afford to pay the networks then they lose the franchise. Obviously this is not what would happen with O&O stations -- they would just get new management, but most stations are not O&O by the networks.
In the case of the O&O stations, they are a separate legal entity that is wholly or partially owned by the networks and operated as a separate business. They pay the fees just like an affiliate station according to a friend I have that works at WTVD, a Disney-owned ABC station in my market. There is no direct correlation between how much the stations pay the networks and how much subscriber revenue they get.
It is the affiliate fees, along with national advertising that generates the revenue that the networks use to buy the programming they distribute to their affiliates. In many cases, you have content from studios that don't have TV networks, like Sony for instance, that is what is being delivered to the stations getting the subscriber fees. If I was a Locast lawyer, that is one thing I would argue if the networks are claiming loss of revenue. Essentially, prove it, because the subscriber revenue doesn't go directly to the networks in most cases.