Gazing at them for hours on end, sitting on the sandy river bank, was a great help to me. I could wash away my anguish and disgust over life. The anguish and disgust were caused by my guardians. They insisted on my taking to as irrational an occupation as learning how to read and write.
I have been unable to understand the structure and meaning of the bold part.
Also, the article usage in irrational an occupation seems a bit odd to me and I think it should be like an irrational occupation.