Is it a good idea to email the admission committee after a suboptimal interview? I didn't do well in a part of a technical interview for a master's program, which was a question in the field X. 

The most important subfield of my major for that program is X and X is not particularly my strength, because I took more advanced courses in other subfields during the last two years of my undergrad. But that is exactly why I want to do that master's program. I've had the necessary elementary courses in the field X, but did not go deeper in those topics, simply because there is not enough time to take all the helpful and good courses as an undergrad. That's why I decided to take some other courses as an undergrad and leave advanced courses in X for my graduate degree. I also want to do a Ph.D. after my master's and the field I want to do my Ph.D. is quite directly related to the master's degree I was interviewed for and involves a great deal of X.

To me, it makes perfect sense to apply for a master's program in a field that I'm not strong in, because otherwise, I wouldn't need to take more courses in that field and I will learn whatever I need, quite easily, through self-study. Is it a good idea to email the admission committee (or the professor who interviewed me) and explain this to them now? (Please keep in mind that I could have mentioned this point in my SOP, but I didn't. Probably a bad decision...)
I think you are overthinking this. A polite email followup to an interview is always fine ("Thanks for the opportunity" "I was really impressed by ____" etc), but it shouldn't be used to make excuses or justify deficiencies in the interview.

It seems likely to me that one of two things are true:

A) You are not adequately prepared for the master's program. This is okay, it doesn't mean you are a bad person, but it means that other people may be selected instead of you, and it may mean that you would struggle in the program and are a better fit elsewhere.

or

B) You are overestimating the importance of the answers to the questions you were asked about X, which may have been geared to measure where your current knowledge is at rather than an exam per se.

In neither of these cases does it matter if you try explain your interview performance after the fact.