Airline reservation systems are archaic! GDS systems they use don't have functionality to pay for ad-ons like bags, seat assignments, etc. It can only be done if something is included in the fare, which really limits functionality.
Airlines can do it when selling directly but not when selling via a 3rd party that uses GDS (includes travel agents & OTAs but also other airlines for interline, codeshare, etc, and sometimes even their GSAs)! This is one of the reasons why low cost airlines avoid using GDSs, prioritising direct sales.
It's simply not fixable within the current architecture leading airlines to start using what they're calling NDC. It's really just APIs to move to an offer-order type system of pricing. There are a whole range of reasons for this, but conceptually allows more specific pricing of things like bags.