Living in Japan alone, one would often be asked whether or not do "自炊", to cook for yourself. Needless to say the opposite word to this is外食, no matter it is at a formal restaurant, or at a school cafeteria.
However, I found a totally different way to use 自炊, and it ha s nothing to do with cooking at all. It related to a way to deal with books --- buy a book for yourself, cut it into separated pages, use a special document scanner to scan it into a digital file, then keep it in your computer and read it on your monitor. There is even a manual to explain all the details and tell you what is good and what is bad for this series of actions.
Japanese wikipedia states clearly that this is a "slang". As to me, I do not see any connection between the word and the action. It is rather a random choice of a word, or a sort of code.