If a woman chooses to be supported from her dead husband's estate, she can; but if the heirs live in the deceased's home then they can (usually) compel her to do so also, or forfeit her upkeep. The reason is that their expenses on her behalf will be less in that home. This is explained by means of example by Tosafos (K'subos 103 amud 1) and Rambam (Yad, Ishus 18:4). Tosafos gives the example of a single lamp that sheds light for many. (If she goes and lives alone, she'll need her own candle, thus approximately doubling the expense.) Rambam says:
Five people, each of whom eat a kav when eating alone, if the five of them eat in one house and in combination, four kav suffice for them.
I wonder whether any later commentaries distinguish Tosafos and Rambam based on the examples they give, showing that these are indicative of different viewpoints regarding some edge cases, or the like.