The others are right, it can be literal and mean that she does what she's supposed to, she serves her purpose. However, when you say something like this about people it's usually not factual, it's a bit unkind.
It is a slightly derogatory remark by The Duchess. When asked "What do you think of Mrs Hatfield"? And The Duchess responds "I suppose she serves her purpose", she means she does just that and nothing more. She nurses him and looks after his affairs, but she has nothing to to say about her.
Usually when you see remarks like "I suppose she serves her purpose", particularly when said in older polite society, it is a slightly snide remark. An insult hidden in a compliment. Exactly what they mean can depend on what you know about the character. In this case Mrs Driffield is known for performing her duties well - looking after his affairs, hiding some of his indiscretions, and nursing him - but nothing more.
You can also see this from the fact that, just after, she says "He must have someone to look after him". The fact that Mrs Hodmarsh then feels the need to defend her with "I think she's quite nice" also shows this.
It's like giving a bad reference for a job. The Duschess' tone hides the subtext, which is a bit snide / mean / derogatory.