, 1680s, "work done at home," as opposed to work done in the shop or factory, from home
(n.) + work
(n.). In sense of "lessons studied at home," it is attested from 1889. To do (one's) homework
in figurative sense "be prepared" is from 1934.