You are right its how the author wrote him and story has been shit for a long time now(for sanji though its been bad for even longer), and it applies few other characters too whom oda doesn't utilise, but in the end everyone is a reader, I mean WCI is the best example, everyone should be dead already if there was no BS writing there, and Sanji as a character is no better than the random character whom oda doesn't give much shit about no matter how much his fans want from him. So people should rather just accept it and move on.