The answer on Quora is just plain wrong. I very much doubt that this is true in India, let alone anywhere else. Indeed, flight crew routinely testify as witnesses in accident investigations and in criminal cases arising from misconduct by passengers on commercial aircraft (for a recent dramatization of such a case consider the movie Sully).
Further, even if it is true in some circumstances, it is almost certainly true that the reason IS NOT "due to cabin pressure and altitude they tend to have a bad memory." Bad memory or impairments, even if you had them, are not a bar to serving as a witness in court. This reasoning would bar anyone from testifying about anything that happens on an aircraft and it is not empirically true that flight crew have bad memories.
If airplane crews were not required to testify involuntarily in India (and I don't know if this is true or not, I suspect it is not true), it would be because flight personnel would be immune to subpoena process because it is unduly burdensome on people who travel so routinely.