According to custom, it is permissible for a belligerent warship to use false colours and to disguise her outward appearance in other ways in order to deceive an enemy, provided that prior to going into action the warship shows her true colours. Aircraft are not, however, enentitled to use false markings.
From false flag Wikipedia page
In land warfare, such operations are generally deemed acceptable under certain circumstances, such as to deceive enemies, provided the deception is not perfidious and that all such deceptions are discarded before opening fire upon the enemy. Similarly, in naval warfare such a deception is considered permissible, provided the false flag is lowered and the true flag raised before engaging in battle.
Initial question: What is the intention of this law, like why is it considered unfair fighting to use false flags (when taking action/open firing already)? ETA: By which I mean to ask: Why is it considered unfair/inhumane/inhuman/unethical/immoral fighting to (continue to) use false flags (when taking action/open firing already)?
Context:
1
What I understand is that a 'war crime' is something which gives you an unfair advantage in that civilians are affected at the cost of your military progress eg chemical weapons, incendiary weapons (at least in our world; alternatively see here or directly here) or well actually directly killing civilians for example.
2
My intention is to genuinely understand what is inhumane/unfair/unjust about attacking with false flags. There's an answer given below that says
neither of these groups is afforded protection from the rules of war. Only if you fire under your own flag you get the protections of a POW if you fall into their hands.
But as Nassim Nicholas Taleb said
'Someone saying "ethics is good for success" is missing the entire point of ethics.'
I'm asking like: If there weren't these incentives, then what would be inhumane about doing this?
So far what I'm seeing is that this so-called war crime is not inhumane at all but really just some dumb rule...or at least some kind of 'deal' or 'gamble' like 'Ok fine, you can use false flags to attack, but you don't get this or that if you lose.'
3
And then finally I can ask on SciFi SE (about Sokka from ATLA) not merely 'Why didn't Sokka follow this rule?' (cheap conventional, stage 2 of 3 in Lawrence Kohlberg's moral development theory that causes reactance like 'There's no Geneva/UN in ATLA. What are you talking about?') but really 'Why did Sokka do this seemingly inhumane thing?' (which would be postconventional, stage 3 of 3 in moral development).