I can understand why this is allowed, though. While the network benefits because they are reaching more customers, it is by far more helpful to the service provider because it's yet another channel that they offer. If they were to not offer the broadcast networks, they'd potentially lose a ton of customers who look elsewhere for that complete package.
However, while networks do charge for retransmission, I do think that locally broadcast channels should absolutely not be charged as a public service. As you pointed out, they are available for free already OTA, and it is helping to reach more viewers to swell ad viewership.
Hell, the entire origin of cable came from packaging the broadcast networks onto a line to reach those who were too far away from the towers. It was until much later than cable-specific programming became a thing. But, we'll never get that fee dropped from service providers.
And in the end, the fees for broadcast pale in comparison to the fees that other networks are collectively charging