It's not an absolute solution, but it makes such a crime both psychologically and physically much more difficult. Turning a knob is impersonal and easy, but killing someone with your hands is neither.
Killing someone is extremely easy if the other person trust you. You get behind her and hit her with a heavy object in the head or in the nape.
If the pilot is busy doing something like piloting the plane, it is very easy for a copilot to get rid of her.
That makes it physically easy, but the psychological demands of that situation are clearly very different from turning a knob. I think there's good reason to think that there are people who would do the former, but not the latter. If the pilot is inclined to crash the plane due to overwhelming depression, for example, I doubt that this pilot is likely to also kill a flight attendant with his bare hands.