The setting of Jane Eyre is the early nineteenth century. This time setting affects many elements of the plot, including Jane's mistreatment in the orphanage and Rochester's marriage to Bertha.
Jane's time at Lowood, under the "care" of Mr. Brocklehurst, gives a clear picture of the mistreatment that children and specifically orphaned children suffered during this time period. There were very few laws regarding the labor or treatment of children.
Once Jane leaves Lowood to serve at Thornfield, readers are met with another challenge presented through the lens of the time period. Rochester's marriage, which he effectively keeps secret throughout most of the novel, is another thing that is heavily impacted by the historical setting. Rochester's marriage would already have been seen as outside of the norm because he married a Creole rather than a woman of English heritage. However, Bertha's mental illness also shows a key element of the time period: there was little that was known about or was done about mental illness.
Rochester's choice to lock her away in the attic seems cruel, absolutely, but it also indicates that there was little else to do with someone suffering from any mental illness. Also, during the time period in which the novel is set, it would have been unheard of for Rochester to divorce his wife. Therefore, his marriage is permanent in the characters's eyes, making it impossible for Rochester and Jane to proceed with their feelings for each other.