Several years ago IATA (International Air Transport Association) recognized that baggage charges on tickets which multiple carriers were a mess. For example, if you were flying a domestic flight on one airline followed by an international flight with a different airline then there was little consistency around how you would be charged for checked bags - especially if the airlines had different "free" baggage allowances.
In order to resolve this problem, IATA passed Resolution 302 which sets the rules for how baggage allowances and charges should be applied on multi-airline itineraries. The rules in Resolution 302 are not simple, and they are not intended to be used directly by humans at check-in counters - but instead are intended to be built into the booking/check-in systems of airlines so that the correct price can be calculated by the system.
Google will find no end of references on Resolution 302 for you, but in short it states that the baggage rules of the "Most Significant Carrier" (MSC) apply. To work out the "MSC" for a flight you need to understand how IATA "regions" work, but for a simple case like an domestic flight followed by an international flight (or vica versa) the baggage rules/fees of the carrier operating the international flight will apply.
Do not confuse which airlines rules/fees apply with who will actually charge you those fees. If you are flying a domestic flight on one airline followed by an international flight with another, then the international carriers rates will apply - but they will be charged by the first airline you fly - ie, the domestic carrier.
The implementation of this resolution by carriers is still patchy. Although most (all?) larger airlines have implemented the rules, many smaller/regional carriers have not. There are also issues introduced when non-standard rules apply to a passenger, such as when you have status on an airline which results in free baggage (especially for a flight other than the first) where the systems are not necessarily capable of correctly calculating the fees.