There are different types of code share agreements. Sometimes airlines just buy a fixed number of seats off each other. I can well imagine that the result of this can be diverging prices offered as one airline runs out of its allocation.
A few years ago, Air France cut its flights between Paris and Vietnam (Hanoi/Saigon). At the same time they entered into a code sharing agreement with Vietnam Airlines - so they could now publicise "daily flights".
I had a flexible C class ticket with AF. When I tried to change it to a day on which VNA was flying, there was constantly "no availability". Well.... I took a voluntary downgrade without compensation. (The AF office were so worried - why would any one fly in economy on VNA when they could fly in business on AF on a day either side - that they got me to put the request in writing.) As it happens, I knew the VNA purser and got re-upgraded on boarding. Most of C was empty - she told me that AF simply hadn't purchased more than a handful of seats. She said it was a "publicity stunt" so that they could claim an upgrade to their service. Sometimes AF pax who had to fly in economy on business tickets would walk into the business section and go ballistic when they realised seats were empty - whilst they'd been told "C was full" by AF reps. My friend would generally upgrade them where possible out of sympathy - but VNA would be making nothing out of it, except good will.
In conclusion, I feel the arrangement was a "cover" for a cut in real flights - as for the economics, I suppose AF has the connections in Europe, so for PAX based in, for example, London, its a way for VNA to access this market.
I personally dislike code-share. Seems to devalue brands - and often its not very clear to pax that the airline they are flying with is not the one they thought they were getting.