From a recent post on passengers & SLF:
quote
Codesharing is a way to boost an airline's position on the reservations computer screen. Generally speaking, when a prospective passenger asks for a particular journey, travel options are listed in the following order:
Nonstop flights
Direct multi-sector flights
Online (=same-airline) connections
Interline (=different airline) connections
Codesharing effectively changes an interline connection into an online connection, moving it up the screen where it's more likely to be proposed by the agent.
unquote
So codesharing is essentially aimed at attracting traffic from a competing network, the revenue for which will be shared pro rata between the two partners as if it were an interline connection.