I look at the cake plotline from a little bit different perspective. While everyone wants the cake to create consequences, I feel the cake was a consequence in itself, one that had to happen in order to keep Sanji in character. It's not that Oda wanted Sanji to make a cake to cause something. He HAD to have Sanji make a cake, because this is what kind of person Sanji is. No matter if it's friend of foe, or how dire the situation is, Sanji won't walk away from a hungry person. The final page of 902 really makes me feel that was Oda's train of thought all along.
It might seem like a rehash of what we had on Baratie, but I think the whole point was to tackle this familiar part of Sanji's character and then push it to the very limit. Making a cake was basically meant to prove that he has complete freedom in exercising his own will, to be who he is. He was thought to feed those who are hungry, so if BM wants to eat, and she will eat only a cake, then he's going to make her a goddamn cake, even if there's hell all around. That is a kind of person he was raised to be and walking away from it would be an admission of defeat.