The mishna teaches: if, at the time of his death, a man says "I have
sons", he is believed. But if he says "I have brothers", he is not
believed. What is this about? If he has sons then he is not childless
and therefore his wife is not obligated to marry his brother (levirate
marriage) -- and, in the other case, if he has no brothers (he is
disbelieved) then she is not obligated to marry them. Both of these
serve to protect her from an unwanted remarriage. (64a)
There is another way for her to get out of the marriage (chalitzah),
but the rabbis consider it demeaning for the rejected brother (and
maybe for her too; I seem to recall that but don't know from where).
So this spares that indignity. And presumably if she is childless
and actually wants to marry his brother through levirate marriage,
the husband can just keep his mouth shut. :-)