Airlines don't care about unused seats, if they did we'd have last minute rates like we do for hotels. Hotels know it's better to have someone pay $20 a night than to have their capacity go unused at $50 so they'll drop the price for booking a day or two in advance.
Airlines do the opposite, they charge more for booking late.
So airlines make the most revenue by setting prices low early on, and higher toward the flight date. They certainly care about unused seats, but the revenue from expensive last-minute bookings normally outweighs the revenue they would get from filling all remaining seats at a discounted price.
They do their best to minimize unused seats by getting the prices right early on, and adjusting based on observed demand. But at a certain point, it makes sense to raise prices even if it's highly likely that there will be unused seats.