I don't see where the *law* says that. It seems to be the practice, but do you have section of the law that says that?
See, 27CFR478.11, which covers the the meaning of terms and phrases.
Committed to a mental institution:
A formal commitment of a person to a mental institution by a court, board, commission, or other lawful authority. The term includes a commitment to a mental institution involuntarily. The term includes commitment for mental defectiveness or mental illness. It also includes commitments for other reasons, such as for drug use.
The term does not include a person in a mental institution for observation or a voluntary admission to a mental institution.