She is probably there to keep the wife from being by herself. A companion is someone who helps assist and keeps company of a person in the household. They can be paying jobs as well. It looks like both, husband and son are out in the fields all day (farmers) and they may need someone help with the wife. Since the girl is 12 she is probably just helping with choirs and keeping the lady company. Think of the movie/book little women, where a couple of the girls , Joe and the youngest girl, were keeping their Aunt accompanied.
The companion's role was to spend her time with her employer, providing company and conversation, to help her to entertain guests and often to accompany her to social events. In return she would be given a room in the family's part of the house, rather than the servants' quarters; all of her meals would be provided, and she would eat with her employer; and she would be paid a small salary, which would be called an "allowance" – never "wages." She would not be expected to perform any domestic duties which her employer might not carry out herself, in other words little other than giving directions to servants, fancy sewing and pouring tea. Thus the role was not very different from that of an adult relation in respect of the lady of a household, except for the essential subservience resulting from financial dependency. https://en.wikipedia.org/wiki/Lady%27s_companion