I don’t believe airlines are allowed to stop you taking photographs even though some may claim they are. You are in a public place and you may take photographs of whomever or whatever you please once you are in the air and free of any laws on the ground (which in any case seem to prohibit pictures of buildings and public servants rather than private individuals).
However, I guess most passengers choose not to stand their ground, believing it to be a foolhardy exercise to argue with cabin crew and risk arrest or ban. That’s certainly why I complied with a Wizz Air instruction to delete a photo.