Often, when they do, it is either:
(1) Because of state funding specifically for rural counties, which amounts to a revenue transfer from urban counties, or
(2) Because the rural town is in a county with, and deriving revenue from, a city, funding county libraries in the rural town as well as the city.
Even more often, tiny rural towns don't have public libraries, and you have to go to a neighboring town or the nearest city.