I've long wondered the same ... codeshares make absolutely no sense to me, and seem like they just create confusion for inexperienced travelers. This isn't a unique issue to BA, as I'm sure you know.
When I'm flying on an AA ticket connecting from an AA flight to an AA codeshare on BA, I don't see how this is in any way benefitting me instead of just listing the actual BA flight number -- and in fact, it adds confusion when I'm looking at my ticket and see a number different from what might be displayed on the screens in the airport.
It's even worse when there are like 5+ codeshares for a particular flight. The other day, I was flying on an AA domestic flight which had the screen cycling through codeshare flight numbers from like 5 different airlines (IIRC: British, Quantas, Cathay, JAL, and Finnair)... Is anyone from Japan really fooled into thinking that JAL is operating a flight from Orlando to Philadelphia?