Coke significantly more popular than Pepsi, especially if you consider Coke and Diet Coke compared with Pepsi and Diet Pepsi (
some discussion).
The sweeter taste of Pepsi only appeals to some cultures.
If they were to stock both, their inflight stock would be weighted very heavily towards cola drinks and away from others, giving other dissatisfactions. They can't bring just a few cans of many things, no customer likes a pot-luck, they want predictability.
So it's better that BA stock Coke.
(I drink neither regularly, I don't have a dog in this race).