I think historically "texts" were all those manuscripts copied by hand and bound. Then printed on presses. Things like religious or academical or historical "texts."
So when socialists wanted to standardize propaganda into big tomes, I guess "textbooks" were a good thing to call them.