Quite simple really Dan. It’s just like any other franchise (eg McDonalds). An independant airline pays to use the BA brand.
The benefit to BA is financial and an extension to the network. The benefit to the independant is the use of the BA name and support from a large airline for things such as reservations systems, aircraft purchasing/leasing, etc.
If a franchise ends (which happens fairly regularily) the two airlines simply part company. Any routes the franchisee operates on behalf of BA would go back to BA, the rest stay with the independant and BA stops selling them as their own.
1L.