R.H. Lossin at the NYRB:
The reason, perhaps, that Thoreau is not put off by the proximity of trains and farms is that he was not seeking solitude for solitude’s sake. He was attempting to extract himself from a society that he found deeply troubling. Thoreau does not begin his record of life alone with the naturalist observations that we have come to associate with him (and at which he excelled). Instead, Walden begins with trenchant critique of “progress.” Thoreau’s aversion to the rapid technological changes brought about by industrialization did not issue from a Romantic attachment to unspoiled Nature. In fact, he quite likes the sound of the trains, or is, at the very least, resigned to their permanent integration into the landscape. In the chapter on “Sounds,” he describes train whistles as well as birdcalls. “I watch,” he writes “the passage of the morning cars with the same feeling that I do the rising of the sun.”
more here.