Instead of paying cash to use a library, stations will exchange a certain amount of commercial inventory (varies depending upon the library in question and market size, but generally 1 or 2 :60 avails/day) for the usage license. The syndication company for the library (ie Premiere, WestwoodOne, etc) then sells all of it's accumulated inventory to national accounts, usually at a significantly reduced rate.
During a good sales economy: the syndicator makes much more money than they would through the normal cash licensing and the station winds up giving away avails that would've been sold... benefits the syndicator more. During a bad sales market, the syndicator makes very little and wind up running many spots for free, and the station is only giving up avails that likely would've been unsold anyway... benefits the station more.